Fix bug in the input buffering of messages to/from fishd causing garbled messages

darcs-hash:20061010222113-ac50b-1b6b01ab781ecbadf11a99b501f19a526ae7a7cf.gz
This commit is contained in:
axel
2006-10-11 08:21:13 +10:00
parent e3e1b34fec
commit f5916358e5
4 changed files with 29 additions and 17 deletions

View File

@@ -275,6 +275,7 @@ static int print_max( const wchar_t *str, int max, int has_more )
int written = 0;
for( i=0; str[i]; i++ )
{
if( written + wcwidth(str[i]) > max )
break;
if( ( written + wcwidth(str[i]) == max) && (has_more || str[i+1]) )
@@ -1030,7 +1031,7 @@ int main( int argc, char **argv )
int is_quoted=0;
array_list_t *comp;
wchar_t *prefix;
if( argc < 3 )
{
debug( 0, L"Insufficient arguments" );