commit | 201863f75dbe0e5b5a6a7a6ff071581cbc54d3a1 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Dec 05 21:06:46 2006 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Dec 05 21:06:46 2006 +0000 |
tree | e600f180f85c1842af411d0e412d33c55bc1a8f3 | |
parent | cf8e7d14aa79066f4b539abdb467ac2e391271dd [diff] [blame] |
updated for version 7.0-178
diff --git a/src/mbyte.c b/src/mbyte.c index 846ce98..735bf65 100644 --- a/src/mbyte.c +++ b/src/mbyte.c
@@ -2294,8 +2294,14 @@ } /* Check directly first, it's faster. */ for (j = 0; j < l; ++j) + { if (s1[i + j] != s2[i + j]) break; + if (s1[i + j] == 0) + /* Both stings have the same bytes but are incomplete or + * have illegal bytes, accept them as equal. */ + l = j; + } if (j < l) { /* If one of the two characters is incomplete return -1. */