diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-06-08 22:00:03 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-06-08 22:00:03 +0000 |
commit | c669e66fb68543c3372e28da563c65cb928e82ec (patch) | |
tree | d93de89ecc76eb4af320bbb5bf5b5917cfb0da58 /src/mbyte.c | |
parent | 3eb98fbbd890976ceb5b015de958be6b9ac5bcb2 (diff) | |
download | vim-git-c669e66fb68543c3372e28da563c65cb928e82ec.tar.gz |
updated for version 7.0083
Diffstat (limited to 'src/mbyte.c')
-rw-r--r-- | src/mbyte.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 96ad26f73..b309fa70a 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -1583,20 +1583,21 @@ utfc_ptr2len_check(p) char_u *p; { int len; + int b0 = *p; #ifdef FEAT_ARABIC int prevlen; #endif - if (*p == NUL) + if (b0 == NUL) return 0; - if (p[0] < 0x80 && p[1] < 0x80) /* be quick for ASCII */ + if (b0 < 0x80 && p[1] < 0x80) /* be quick for ASCII */ return 1; /* Skip over first UTF-8 char, stopping at a NUL byte. */ len = utf_ptr2len_check(p); /* Check for illegal byte. */ - if (len == 1 && p[0] >= 0x80) + if (len == 1 && b0 >= 0x80) return 1; /* |