diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-19 16:59:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-19 16:59:59 -0700 |
commit | 92d273995c487edcffde501bf05a2905aef2e99c (patch) | |
tree | bb02c0043025df5b4d5ee557c0a806586ed2e602 | |
parent | c9fe7cc60c78e122e1943a6c664231460cb25539 (diff) | |
download | txr-92d273995c487edcffde501bf05a2905aef2e99c.tar.gz txr-92d273995c487edcffde501bf05a2905aef2e99c.tar.bz2 txr-92d273995c487edcffde501bf05a2905aef2e99c.zip |
bugfix: regression in horizontal @(trailer)
* match.c (h_trailer): Prevent LOG_MATCH call from
being evaluated in failed case, when the position is nil.
This situation triggers an exception, because LOG_MATCH
prints the position as an integer using ~d.
-rw-r--r-- | match.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1247,10 +1247,10 @@ static val h_trailer(match_line_ctx *c) if (!new_pos) { LOG_MISMATCH("trailer"); ret = nil; + } else { + LOG_MATCH("trailer", new_pos); + ret = cons(new_bindings, plus(c->pos, c->base)); } - - LOG_MATCH("trailer", new_pos); - ret = cons(new_bindings, plus(c->pos, c->base)); } uw_unwind { |