Once again me.
Here is the patch which avoids a possible segmentation fault.
Avoid segfault.
Go to the page with a few lines. Follow a link to a page with more lines.
Move cursor down, do not stay on a link.
Go back and do move-link-prev-line. This caused a segmentation fault.
---
commit 888ba8751674471768d846ff3443aa7bb71ecf82
tree f8a0a629f1aa0455f4532ad259224ab62fbef497
parent 14b37d0362f9963cb2803d08d2c3e6e84574cdbe
author Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 20:43:22 +0200
committer Witold Filipczyk <[EMAIL PROTECTED]> Tue, 14 Aug 2007 20:43:22 +0200
src/viewer/text/view.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/viewer/text/view.c b/src/viewer/text/view.c
index a0ebefa..8724603 100644
--- a/src/viewer/text/view.c
+++ b/src/viewer/text/view.c
@@ -189,8 +189,8 @@ move_link_prev_line(struct session *ses, struct
document_view *doc_view)
get_link_x_bounds(link, y1, &min_x, &max_x);
} else {
min_x = max_x = x1;
- int_upper_bound(&y, document->height - 1);
}
+ int_upper_bound(&y, document->height - 1);
for (; y >= 0; y--, min_x = INT_MAX) {
link = document->lines1[y];
@@ -238,8 +238,8 @@ move_link_next_line(struct session *ses, struct
document_view *doc_view)
get_link_x_bounds(link, y1, &min_x, &max_x);
} else {
min_x = max_x = x1;
- int_upper_bound(&y, document->height - 1);
}
+ int_upper_bound(&y, document->height - 1);
for (; y < document->height; y++, min_x = -1) {
link = document->lines1[y];
_______________________________________________
elinks-dev mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-dev