aboutsummaryrefslogtreecommitdiffstats
path: root/search.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2001-11-16 17:25:52 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2001-11-16 17:25:52 +0000
commit40d405e05b078333222f942aa95632e1963d8bb9 (patch)
tree2f66e9cbb7edb36112cc6c6d68f518ff8ff084fc /search.c
parent*** empty log message *** (diff)
downloadw3m-40d405e05b078333222f942aa95632e1963d8bb9.tar.gz
w3m-40d405e05b078333222f942aa95632e1963d8bb9.zip
[w3m-dev 02418]
main.c: mailto: like pattern to mark as anchor search.c: check NULL add disp_message() by ukai
Diffstat (limited to '')
-rw-r--r--search.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/search.c b/search.c
index ae74284..5b5ddaf 100644
--- a/search.c
+++ b/search.c
@@ -14,6 +14,10 @@ forwardSearch(Buffer * buf, char *str)
return FALSE;
}
l = begin = buf->currentLine;
+ if (l == NULL) {
+ disp_message("Not found", FALSE);
+ return FALSE;
+ }
pos = buf->pos + 1;
#ifdef JP_CHARSET
if (l->propBuf[pos] & PC_KANJI2)
@@ -78,6 +82,10 @@ backwardSearch(Buffer * buf, char *str)
return FALSE;
}
l = begin = buf->currentLine;
+ if (l == NULL) {
+ disp_message("Not found", FALSE);
+ return FALSE;
+ }
if (buf->pos > 0) {
pos = buf->pos - 1;
#ifdef JP_CHARSET