[vlc-devel] commit: IsUTF8: redumdant check for nul ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 7 10:02:24 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb  6 23:48:35 2010 +0200| [8524d44bbbfa4a3aabf1176b1d41a295b603180a] | committer: Rémi Denis-Courmont 

IsUTF8: redumdant check for nul

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8524d44bbbfa4a3aabf1176b1d41a295b603180a
---

 src/text/unicode.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/text/unicode.c b/src/text/unicode.c
index e85be35..5487e25 100644
--- a/src/text/unicode.c
+++ b/src/text/unicode.c
@@ -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);




More information about the vlc-devel mailing list