summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c6
1 files changed, 4 insertions, 2 deletions
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 {