aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--main.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 61cc085..5a017c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-18 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev 03263] fix lastA segfault
+ * main.c (lastA): fix lastA segfault when no anchor found
+
2002-07-18 Fumitoshi UKAI <ukai@debian.or.jp>
* version.c.in: cvs version
@@ -3556,4 +3561,4 @@
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.400 2002/07/17 16:05:41 ukai Exp $
+$Id: ChangeLog,v 1.401 2002/07/17 16:07:37 ukai Exp $
diff --git a/main.c b/main.c
index e391bcd..8e0dd8e 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.109 2002/07/01 11:12:14 ukai Exp $ */
+/* $Id: main.c,v 1.110 2002/07/17 16:07:37 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -3307,7 +3307,7 @@ lastA(void)
HmarkerList *hl = Currentbuf->hmarklist;
BufferPoint *po;
Anchor *an;
- int hseq = hl->nmark - 1;
+ int hseq;
if (Currentbuf->firstLine == NULL)
return;
@@ -3318,6 +3318,8 @@ lastA(void)
hseq = 0;
else if (prec_num > 0)
hseq = hl->nmark - prec_num;
+ else
+ hseq = hl->nmark - 1;
do {
if (hseq < 0)
return;