]> git.sesse.net Git - vlc/commitdiff
Revert flawed [17208]. Really fix the sign comparison.
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 21 Oct 2006 13:12:57 +0000 (13:12 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 21 Oct 2006 13:12:57 +0000 (13:12 +0000)
(Hint: man 3 iconv)

modules/demux/nsc.c

index fb61a8a5373d68e24b3296afb77d31ee0632a3a7..28bc922efc470b5f093ac60ee9f3ec12da93b639 100644 (file)
@@ -235,7 +235,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded )
     }
 
     conv = vlc_iconv_open( "UTF-8", "UTF-16LE" );
-    if( conv == (vlc_iconv_t)-1 )
+    if( conv == (vlc_iconv_t)(-1) )
     {
         msg_Err( p_demux, "iconv_open failed" );
         free( buf16 );
@@ -246,7 +246,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded )
     p_buf8 = buf8;
     p_buf16 = (const char *)buf16;
 
-    if( vlc_iconv( conv, &p_buf16, &buf16_size, &p_buf8, &buf8_size ) == 0 )
+    if( vlc_iconv( conv, &p_buf16, &buf16_size, &p_buf8, &buf8_size ) == (size_t)(-1) )
     {
         msg_Err( p_demux, "iconv failed" );
         return NULL;