diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-08 23:38:05 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-08 23:38:05 +0000 |
commit | 50c52408f5945bf9f37329011376a3165f12cbc6 (patch) | |
tree | be6d22746de2c4b5e93e4eac53d5cb82694be60f /desktop | |
parent | 6fee220c529a960da6fe2ba96f3bfbbb40796003 (diff) | |
download | netsurf-50c52408f5945bf9f37329011376a3165f12cbc6.tar.gz netsurf-50c52408f5945bf9f37329011376a3165f12cbc6.tar.bz2 |
Fix seg fault when moving cursor up onto empty top line.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/textarea.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/textarea.c b/desktop/textarea.c index 39135b0c1..a15d64ca2 100644 --- a/desktop/textarea.c +++ b/desktop/textarea.c @@ -1836,7 +1836,7 @@ bool textarea_keypress(struct textarea *ta, uint32_t key) c_line = ta->caret_pos.line; c_chars = ta->caret_pos.char_off; - if (ta->text.data[b_off + b_len - 1] == ' ' + if (b_len > 0 && ta->text.data[b_off + b_len - 1] == ' ' && line < ta->line_count - 1) b_len--; |