Small edit in common.c

darcs-hash:20060302113142-ac50b-33e3e91e0ae1787784fde100c9c0878cdd2ed45f.gz
This commit is contained in:
axel 2006-03-02 21:31:42 +10:00
parent 2d3588fa51
commit 676c3ed505

View File

@ -300,19 +300,14 @@ char *wcs2str_internal( const wchar_t *in, char *out )
{
res = wcrtomb( &out[out_pos], in[in_pos], &state );
switch( res )
if( res == (size_t)(-1) )
{
case (size_t)(-1):
{
debug( 1, L"Wide character has no narrow representation" );
memset( &state, 0, sizeof(state) );
break;
}
default:
{
out_pos += res;
break;
}
debug( 1, L"Wide character has no narrow representation" );
memset( &state, 0, sizeof(state) );
}
else
{
out_pos += res;
}
}
in_pos++;