]> git.sesse.net Git - vlc/commitdiff
IsUTF8: redumdant check for nul
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 6 Feb 2010 21:48:35 +0000 (23:48 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 6 Feb 2010 21:48:35 +0000 (23:48 +0200)
src/text/unicode.c

index e85be3567b896f7bd8f195596e195bbd5356bb3a..5487e250b717574f7a6645422f36755794025d25 100644 (file)
@@ -317,8 +317,7 @@ static char *CheckUTF8( char *str, char rep )
             assert (cp < (1 << 26));
             c = ptr[i];
 
-            if ((c == '\0') // unexpected end of string
-             || ((c >> 6) != 2)) // not a continuation byte
+            if ((c >> 6) != 2) // not a continuation byte
                 goto error;
 
             cp = (cp << 6) | (ptr[i] & 0x3f);