aboutsummaryrefslogtreecommitdiffstats
path: root/src/search.c
diff options
context:
space:
mode:
authorKarl Heuer <[email protected]>1997-02-23 22:49:18 +0000
committerKarl Heuer <[email protected]>1997-02-23 22:49:18 +0000
commitf73d78a2f4a325cc943bd464eccc566ceb8fddfa (patch)
tree9efdae7676bc7ef07d1728672872f526576d841f /src/search.c
parent369314dc63fa395283a103cbeb1c66ed10baf1bd (diff)
Fix previous change.
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/search.c b/src/search.c
index f96e9e53bd..d321ec1901 100644
--- a/src/search.c
+++ b/src/search.c
@@ -848,10 +848,11 @@ skip_chars (forwardp, syntaxp, string, lim)
{
while (pos > XINT (lim))
{
+ int savepos = pos;
DEC_POS (pos);
if (!fastmap[(int) SYNTAX (FETCH_CHAR (pos))])
{
- INC_POS (pos);
+ pos = savepos;
break;
}
}
@@ -889,6 +890,7 @@ skip_chars (forwardp, syntaxp, string, lim)
{
while (pos > XINT (lim))
{
+ int savepos = pos;
DEC_POS (pos);
if (fastmap[(c = FETCH_BYTE (pos))])
{
@@ -903,14 +905,23 @@ skip_chars (forwardp, syntaxp, string, lim)
if (ch >= char_ranges[i] && ch <= char_ranges[i + 1])
break;
if (!(negate ^ (i < n_char_ranges)))
- break;
+ {
+ pos = savepos;
+ break;
+ }
}
else
if (!negate)
- break;
+ {
+ pos = savepos;
+ break;
+ }
}
else
- break;
+ {
+ pos = savepos;
+ break;
+ }
}
}
}