1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

move-link-up-line: segfault when cursor was below last line.

This commit is contained in:
Witold Filipczyk 2007-08-20 09:01:49 +02:00 committed by Witold Filipczyk
parent 052f7a93bb
commit c646c860cd

View File

@ -616,6 +616,7 @@ move_link_up_line(struct session *ses, struct document_view *doc_view)
min_y = vs->y - box->height; min_y = vs->y - box->height;
int_lower_bound(&min_y, 0); int_lower_bound(&min_y, 0);
y1 = y = vs->y + ses->tab->y - box->y; y1 = y = vs->y + ses->tab->y - box->y;
int_upper_bound(&y, document->height - 1);
for (y--; y >= min_y; y--) { for (y--; y >= min_y; y--) {
struct link *link = document->lines1[y]; struct link *link = document->lines1[y];