Fix potential crash bug when pasting large amounts of text into the shell

darcs-hash:20070107140410-ac50b-c7b680b05f3aaf7f10e6e06a0fdc232d30c3e1b1.gz
This commit is contained in:
axel 2007-01-08 00:04:10 +10:00
parent 3b4bacb5ba
commit 3fbd8036f4

View file

@ -693,7 +693,7 @@ static int insert_str(wchar_t *str)
{
memmove( &data->buff[data->buff_pos+len],
&data->buff[data->buff_pos],
sizeof(wchar_t)*(data->buff_len-data->buff_pos) );
sizeof(wchar_t)*(old_len-data->buff_pos) );
}
memmove( &data->buff[data->buff_pos], str, sizeof(wchar_t)*len );
data->buff_pos += len;