Commit 8524d44b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

IsUTF8: redumdant check for nul

parent dd1e8bad
...@@ -317,8 +317,7 @@ static char *CheckUTF8( char *str, char rep ) ...@@ -317,8 +317,7 @@ static char *CheckUTF8( char *str, char rep )
assert (cp < (1 << 26)); assert (cp < (1 << 26));
c = ptr[i]; c = ptr[i];
if ((c == '\0') // unexpected end of string if ((c >> 6) != 2) // not a continuation byte
|| ((c >> 6) != 2)) // not a continuation byte
goto error; goto error;
cp = (cp << 6) | (ptr[i] & 0x3f); cp = (cp << 6) | (ptr[i] & 0x3f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment