summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/match.c b/match.c
index 9f49657d..cc61479e 100644
--- a/match.c
+++ b/match.c
@@ -426,7 +426,8 @@ static val search_form(match_line_ctx *c, val needle_form, val from_end)
rlcp(spec, needle_form);
- for (; (from_end && ge(pos, c->pos)) || length_str_ge(c->dataline, pos);
+ for (; (from_end && ge(pos, c->pos)) ||
+ (!from_end && length_str_ge(c->dataline, pos));
pos = plus(pos, step))
{
cons_bind (new_bindings, new_pos,