aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-07-17 16:07:37 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-07-17 16:07:37 +0000
commit81499ed693d7eeaddcb2d1418b6de654cc37ebe0 (patch)
treef3cfc44396dbb5e0dcf6d174b9efca2840425ccb /main.c
parentcvs version (diff)
downloadw3m-81499ed693d7eeaddcb2d1418b6de654cc37ebe0.tar.gz
w3m-81499ed693d7eeaddcb2d1418b6de654cc37ebe0.zip
[w3m-dev 03263] fix lastA segfault
* main.c (lastA): fix lastA segfault when no anchor found From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 4 insertions, 2 deletions
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;