diff options
author | 2005-10-28 01:21:48 +1000 | |
---|---|---|
committer | 2005-10-28 01:21:48 +1000 | |
commit | b78fba810cc0dde84ff68b408c96aa8be502e0d4 (patch) | |
tree | 38af12f2ffdca8de62824d4a82f1017f1b8c8658 /reader.c | |
parent | 43213ee45858486e95adcdbe2a9e3452a97e9f53 (diff) |
Fix crash bug when pasting long text
darcs-hash:20051027152148-ac50b-b47b96bc8acae760ce53a2e42d23dc2d07bf2302.gz
Diffstat (limited to 'reader.c')
-rw-r--r-- | reader.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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], |