0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.0083

This commit is contained in:
Bram Moolenaar 2005-06-08 22:00:03 +00:00
parent 3eb98fbbd8
commit c669e66fb6

View File

@ -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;
/*