mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 15:51:15 -03:00
Fix crash bug when pasting long text
darcs-hash:20051027152148-ac50b-b47b96bc8acae760ce53a2e42d23dc2d07bf2302.gz
This commit is contained in:
5
reader.c
5
reader.c
@@ -1007,12 +1007,13 @@ static int insert_str(wchar_t *str)
|
||||
}
|
||||
else
|
||||
{
|
||||
int old_len = data->buff_len;
|
||||
|
||||
data->buff_len += len;
|
||||
check_size();
|
||||
|
||||
/* Insert space for extra character at the right position */
|
||||
if( data->buff_pos < data->buff_len )
|
||||
/* Insert space for extra characters at the right position */
|
||||
if( data->buff_pos < old_len )
|
||||
{
|
||||
memmove( &data->buff[data->buff_pos+len],
|
||||
&data->buff[data->buff_pos],
|
||||
|
||||
Reference in New Issue
Block a user