From: Bram Moolenaar Date: Wed, 8 Jun 2005 22:00:03 +0000 (+0000) Subject: updated for version 7.0083 X-Git-Tag: v7.0083~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c669e66fb68543c3372e28da563c65cb928e82ec;p=vim updated for version 7.0083 --- 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; /*