handle wctomb() failure in parse_char() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
f282428a42
commit
0d847aadd9
|
@ -190,6 +190,8 @@ int parse_char(const char *str, int *chr, size_t *col
|
|||
|
||||
if (wctomb(ctrl_wide_str, (wchar_t)wide_str) != -1)
|
||||
*col += wcwidth(wide_str);
|
||||
else
|
||||
(*col)++;
|
||||
|
||||
free(ctrl_wide_str);
|
||||
/* If we have a normal character, get its width in columns
|
||||
|
|
Loading…
Reference in New Issue