summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-11-14 08:38:56 -0800
committerKaz Kylheku <kaz@kylheku.com>2015-11-14 08:38:56 -0800
commita70247be12c8076aa055cfc2c00c149e104ec8bf (patch)
tree82e16b0ae539a4286b035c2c3b3cdfc1b060c9dd
parentea8bf1c897290d2283033d8e3546a970cdd096f3 (diff)
downloadtxr-a70247be12c8076aa055cfc2c00c149e104ec8bf.tar.gz
txr-a70247be12c8076aa055cfc2c00c149e104ec8bf.tar.bz2
txr-a70247be12c8076aa055cfc2c00c149e104ec8bf.zip
Bugfix: broken ~o specifier for bignums.
* stream.c (formatv): The commit in which I added the ~b specifier broke bignum octal printing due to an incredibly silly typo.
-rw-r--r--stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream.c b/stream.c
index 9c0fabda..54f7533d 100644
--- a/stream.c
+++ b/stream.c
@@ -2347,7 +2347,7 @@ val formatv(val stream_in, val fmtstr, struct args *al)
typ = type(obj);
oct:
if (typ == BGNUM) {
- int rad = ch == '0' ? 8 : 2;
+ int rad = ch == 'o' ? 8 : 2;
int nchars = mp_radix_size(mp(obj), rad);
if (nchars >= convert(int, sizeof (num_buf)))
pnum = coerce(char *, chk_malloc(nchars + 1));