diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-07-08 07:58:20 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-07-08 07:58:20 -0700 |
commit | d60eeab9d2eda8c05ecb27961306468608eb4006 (patch) | |
tree | 8cb35b9f24d2739aff281f15e08d580336efbc76 /lib.c | |
parent | bb481714ff3ddc5be9cadc2dcce2889caf63d080 (diff) | |
download | txr-d60eeab9d2eda8c05ecb27961306468608eb4006.tar.gz txr-d60eeab9d2eda8c05ecb27961306468608eb4006.tar.bz2 txr-d60eeab9d2eda8c05ecb27961306468608eb4006.zip |
uref/qref: printing bug.
* lib.c (obj_print_impl): The simple_qref_args_p function is
called with reversed values of pos. For uref, we want 1,
because the first item occurs after the dot, and for qref we
want 0, because the first item occurs before the dot. This
mix up means that the degenerate syntax (qref X) incorrectly
prints as just X instead of (qref X). Likewise, though
harmlessly, (uref X) fails to render as .X, instead coming out
as (uref X).
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12351,7 +12351,7 @@ val obj_print_impl(val obj, val out, val pretty, struct strm_ctx *ctx) put_string(lit(".."), out); obj_print_impl(third(obj), out, pretty, ctx); } else if ((sym == uref_s || sym == qref_s) && - simple_qref_args_p(cdr(obj), if3(sym == uref_s, zero, one))) + simple_qref_args_p(cdr(obj), if3(sym == uref_s, one, zero))) { val iter = cdr(obj), next; |