From 3fbd8036f4b7b535aa60569b28ce9a3a2eee45d0 Mon Sep 17 00:00:00 2001 From: axel Date: Mon, 8 Jan 2007 00:04:10 +1000 Subject: [PATCH] Fix potential crash bug when pasting large amounts of text into the shell darcs-hash:20070107140410-ac50b-c7b680b05f3aaf7f10e6e06a0fdc232d30c3e1b1.gz --- reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reader.c b/reader.c index d8d9c902d..b11aa40a7 100644 --- a/reader.c +++ b/reader.c @@ -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;