summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--stream.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 541c8d9e..cf1ae0da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-30 Kaz Kylheku <kaz@kylheku.com>
+
+ * stream.c (vformat): Bugfix: ~X printing in lower case, like ~x,
+ when argument is a bignum integer.
+
2015-03-29 Kaz Kylheku <kaz@kylheku.com>
* mpi-patches/eliminate-locale-dependencies: New patch.
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);