diff options
author | 2006-10-11 08:21:13 +1000 | |
---|---|---|
committer | 2006-10-11 08:21:13 +1000 | |
commit | f5916358e5ddf17dbed979edc824afaebe3091cc (patch) | |
tree | 2cb8c4a4fbad5cdced8448641bd6b495d487a0b8 /fish_pager.c | |
parent | e3e1b34fec378ca6e78f48b7ff914e375723e1ec (diff) |
Fix bug in the input buffering of messages to/from fishd causing garbled messages
darcs-hash:20061010222113-ac50b-1b6b01ab781ecbadf11a99b501f19a526ae7a7cf.gz
Diffstat (limited to 'fish_pager.c')
-rw-r--r-- | fish_pager.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fish_pager.c b/fish_pager.c index 855fd14b..026e0429 100644 --- a/fish_pager.c +++ b/fish_pager.c @@ -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" ); |