summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-06-08 22:00:03 +0000
committerBram Moolenaar <Bram@vim.org>2005-06-08 22:00:03 +0000
commitc669e66fb68543c3372e28da563c65cb928e82ec (patch)
treed93de89ecc76eb4af320bbb5bf5b5917cfb0da58
parent3eb98fbbd890976ceb5b015de958be6b9ac5bcb2 (diff)
updated for version 7.0083
-rw-r--r--src/mbyte.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 96ad26f737..b309fa70a6 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;
/*