summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-03-30 07:03:55 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-03-30 07:03:55 -0700
commit34bc9081f5f95217b2bd544f6601d48b682297c6 (patch)
tree604204a5b5db003ff9ed13d4da561cfb51eb317a /stream.c
parent53d6cd8562ff76f742fe72c62046928188e9478e (diff)
downloadtxr-34bc9081f5f95217b2bd544f6601d48b682297c6.tar.gz
txr-34bc9081f5f95217b2bd544f6601d48b682297c6.tar.bz2
txr-34bc9081f5f95217b2bd544f6601d48b682297c6.zip
* stream.c (vformat): Bugfix: ~X printing in lower case, like ~x,
when argument is a bignum integer.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index 42711681..136fb3dc 100644
--- a/stream.c
+++ b/stream.c
@@ -1862,7 +1862,7 @@ val vformat(val stream, val fmtstr, va_list vl)
int nchars = mp_radix_size(mp(obj), 16);
if (nchars >= convert(int, sizeof (num_buf)))
pnum = coerce(char *, chk_malloc(nchars + 1));
- mp_toradix_case(mp(obj), coerce(unsigned char *, pnum), 16, 1);
+ mp_toradix_case(mp(obj), coerce(unsigned char *, pnum), 16, ch == 'x');
} else {
const char *fmt = ch == 'x' ? num_fmt->hex : num_fmt->HEX;
value = c_num(obj);