]> git.sesse.net Git - vlc/commitdiff
* src/misc/charset.c: if(a<b<c) is a pythonism and doesn't work in C.
authorSam Hocevar <sam@videolan.org>
Mon, 11 Jul 2005 08:44:39 +0000 (08:44 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 11 Jul 2005 08:44:39 +0000 (08:44 +0000)
src/misc/charset.c

index 88fc704dd2a2119baba357e7c33562835efa9839..23ec2cfc2447d6a6cd43483b8c3aa9e897844227 100644 (file)
@@ -213,7 +213,8 @@ static char *vlc_encoding_from_locale( char *psz_locale )
 
         if( psz_modifier == NULL )
             return psz_dot;
-        if( 0 < ( psz_modifier - psz_dot ) < sizeof( buf ))
+        if( 0 < ( psz_modifier - psz_dot )
+             && ( psz_modifier - psz_dot ) < sizeof( buf ))
         {
             memcpy( buf, psz_dot, psz_modifier - psz_dot );
             buf[ psz_modifier - psz_dot ] = '\0';