From e24b844825e726b0f050faaf28d00798c29e342f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 28 Sep 2011 11:18:48 -0700 Subject: * match.c (match_line): Bugfix in double var. Do not prepend the next_pat to the specline if it is nil. --- ChangeLog | 5 +++++ match.c | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 91978a74..868df28e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-09-28 Kaz Kylheku + + * match.c (match_line): Bugfix in double var. Do not + prepend the next_pat to the specline if it is nil. + 2011-09-28 Kaz Kylheku * match.c (match_line): Logic restructured to allow for diff --git a/match.c b/match.c index 01d96bf5..81d7df95 100644 --- a/match.c +++ b/match.c @@ -433,8 +433,10 @@ static val match_line(val bindings, val specline, val dataline, pos = fpos; LOG_MATCH("double var regex (second var)", plus(fpos, flen)); pos = plus(fpos, flen); - specline = cons(next_pat, rest(specline)); - continue; + if (next_pat) { + specline = cons(next_pat, rest(specline)); + continue; + } } else if (!pair) { sem_error(spec_lineno, lit("consecutive unbound variables"), nao); } else { -- cgit v1.2.3