mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-18 19:02:46 +08:00
Small edit in common.c
darcs-hash:20060302113142-ac50b-33e3e91e0ae1787784fde100c9c0878cdd2ed45f.gz
This commit is contained in:
parent
2d3588fa51
commit
676c3ed505
19
common.c
19
common.c
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user