mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Buffer overflow fix (read-only, might have caused some crashes).
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1953 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
f6fea30ff5
commit
9833844f38
@ -355,11 +355,14 @@ static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,
|
||||
}
|
||||
term_set_color(view->window, color);
|
||||
|
||||
/* get the beginning of the next subline */
|
||||
text_newline = subline == cache->count-1 ? NULL :
|
||||
cache->lines[subline].start;
|
||||
|
||||
need_move = !cache->lines[subline].continues;
|
||||
if (subline == cache->count-1) {
|
||||
text_newline = NULL;
|
||||
need_move = FALSE;
|
||||
} else {
|
||||
/* get the beginning of the next subline */
|
||||
text_newline = cache->lines[subline].start;
|
||||
need_move = !cache->lines[subline].continues;
|
||||
}
|
||||
drawcount++;
|
||||
subline++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user