summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-11-23 12:52:03 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-11-23 12:52:03 -0800
commit5133802c58ef432ab8b289418ee834ba480d74eb (patch)
treeaae71b73f8c2cfd095f20b2e0569a12e8f2173d9 /match.c
parentc1202a71a068c13a17b69348a6d7736b8855be0c (diff)
downloadtxr-5133802c58ef432ab8b289418ee834ba480d74eb.tar.gz
txr-5133802c58ef432ab8b289418ee834ba480d74eb.tar.bz2
txr-5133802c58ef432ab8b289418ee834ba480d74eb.zip
* lib.c (plus, minus): Fixed wrong assertion which would incorrectly
fire for inputs that do not overflow. * match.c (search_form): Fixed incorrect loop test which could lead to nonterminating behavior. * RELNOTES: Updated.
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,