diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-11-23 12:52:03 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-11-23 12:52:03 -0800 |
commit | 5133802c58ef432ab8b289418ee834ba480d74eb (patch) | |
tree | aae71b73f8c2cfd095f20b2e0569a12e8f2173d9 /match.c | |
parent | c1202a71a068c13a17b69348a6d7736b8855be0c (diff) | |
download | txr-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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, |