diff options
Diffstat (limited to 'src/charset.c')
-rw-r--r-- | src/charset.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c index cc02563b2..5b0e71c8a 100644 --- a/src/charset.c +++ b/src/charset.c @@ -187,9 +187,14 @@ buf_init_chartab(buf, global) if (VIM_ISDIGIT(*p)) c2 = getdigits(&p); else +#ifdef FEAT_MBYTE + if (has_mbyte) + c2 = mb_ptr2char_adv(&p); + else +#endif c2 = *p++; } - if (c <= 0 || (c2 < c && c2 != -1) || c2 >= 256 + if (c <= 0 || c >= 256 || (c2 < c && c2 != -1) || c2 >= 256 || !(*p == NUL || *p == ',')) return FAIL; |