1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-30 02:45:25 -04: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:
Timo Sirainen 2001-11-01 22:30:45 +00:00 committed by cras
parent f6fea30ff5
commit 9833844f38

View File

@ -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++;
}