diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-01-04 16:47:25 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-01-04 16:47:25 +0000 |
commit | c048f672ee9fae990e2388c6bd73806b994798e0 (patch) | |
tree | dc15c513e73954797591a6d455707511fe0af9ae /src | |
parent | 690ffc03849a8eee867a584c04b9282007928c14 (diff) |
updated for version 7.1-202v7.1.202
Diffstat (limited to 'src')
-rw-r--r-- | src/mbyte.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index b2303fdae3..286df5d564 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -1642,7 +1642,7 @@ utf_byte2len(b) * Get the length of UTF-8 byte sequence "p[size]". Does not include any * following composing characters. * Returns 1 for "". - * Returns 1 for an illegal byte sequence. + * Returns 1 for an illegal byte sequence (also in incomplete byte seq.). * Returns number > "size" for an incomplete byte sequence. */ int @@ -1652,13 +1652,14 @@ utf_ptr2len_len(p, size) { int len; int i; + int m; if (*p == NUL) return 1; - len = utf8len_tab[*p]; + m = len = utf8len_tab[*p]; if (len > size) - return len; /* incomplete byte sequence. */ - for (i = 1; i < len; ++i) + m = size; /* incomplete byte sequence. */ + for (i = 1; i < m; ++i) if ((p[i] & 0xc0) != 0x80) return 1; return len; diff --git a/src/version.c b/src/version.c index ce13924175..864228eddd 100644 --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 202, +/**/ 201, /**/ 200, |