From: David Lawrence Ramsey Date: Wed, 29 Dec 2004 22:05:02 +0000 (+0000) Subject: handle wctomb() failure in parse_char() too X-Git-Tag: v1.3.6~194 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0d847aadd9159109dbddc4493322e84855f219a9;p=nano.git handle wctomb() failure in parse_char() too git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/src/utils.c b/src/utils.c index 3a38b264..4e8c4280 100644 --- a/src/utils.c +++ b/src/utils.c @@ -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