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 | 3b8184d79cf66684b1a2f277d7758335b5d31267 (patch) | |
tree | bb02c0043025df5b4d5ee557c0a806586ed2e602 | |
parent | 917a7a57cfb6b88122f23c02fa7b4bb66511bb9e (diff) | |
download | txr-3b8184d79cf66684b1a2f277d7758335b5d31267.tar.gz txr-3b8184d79cf66684b1a2f277d7758335b5d31267.tar.bz2 txr-3b8184d79cf66684b1a2f277d7758335b5d31267.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 { |