Commit 4ee06144 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Revert flawed [17208]. Really fix the sign comparison.

(Hint: man 3 iconv)
parent 21154aab
...@@ -235,7 +235,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded ) ...@@ -235,7 +235,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded )
} }
conv = vlc_iconv_open( "UTF-8", "UTF-16LE" ); 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" ); msg_Err( p_demux, "iconv_open failed" );
free( buf16 ); free( buf16 );
...@@ -246,7 +246,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded ) ...@@ -246,7 +246,7 @@ char *nscdec( vlc_object_t *p_demux, char* p_encoded )
p_buf8 = buf8; p_buf8 = buf8;
p_buf16 = (const char *)buf16; 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" ); msg_Err( p_demux, "iconv failed" );
return NULL; return NULL;
......
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