w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

commit f20f47302ec91a25b6de145c69a5c0bd584d02aa
parent b59b84bdb330f73de759ae19cc75e189e708d4ad
Author: a-ito <a-ito>
Date:   Fri, 11 Jan 2002 02:24:13 +0000

2002-01-11  Akinori Ito <aito@fw.ipsj.or.jp>

	* [w3m-dev 02819]
	* regex.c (RegexMatch): loop condition changed (from < to <= )
	* regex.c (regmatch_iter): end condition changed (from >= to >)
	* search.c (forwardSearch): next search fix

Diffstat:
MChangeLog | 7+++++++
Mregex.c | 4++--
Msearch.c | 3++-
3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +2002-01-11 Akinori Ito <aito@fw.ipsj.or.jp> + + * [w3m-dev 02819] + * regex.c (RegexMatch): loop condition changed (from < to <= ) + * regex.c (regmatch_iter): end condition changed (from >= to >) + * search.c (forwardSearch): next search fix + 2002-01-11 Fumitoshi UKAI <ukai@debian.or.jp> * [w3m-dev 02818] diff --git a/regex.c b/regex.c @@ -265,7 +265,7 @@ RegexMatch(Regex *re, char *str, int len, int firstp) len = strlen(str); re->position = NULL; ep = str + len; - for (p = str; p < ep; p++) { + for (p = str; p <= ep; p++) { lpos = NULL; re->lposition = NULL; for (r = re; r != NULL; r = r->alt_regex) { @@ -554,7 +554,7 @@ regmatch_iter(struct MatchingContext1 *c, c->re++; c->firstp = 0; } - if (c->str >= c->end_p) { + if (c->str > c->end_p) { return 0; } } diff --git a/search.c b/search.c @@ -23,7 +23,8 @@ forwardSearch(Buffer *buf, char *str) if (l->propBuf[pos] & PC_KANJI2) pos++; #endif - if (regexMatch(&l->lineBuf[pos], l->len - pos, 0) == 1) { + if (pos < l->len && + regexMatch(&l->lineBuf[pos], l->len - pos, 0) == 1) { matchedPosition(&first, &last); buf->pos = first - l->lineBuf; arrangeCursor(buf);