From a70247be12c8076aa055cfc2c00c149e104ec8bf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 14 Nov 2015 08:38:56 -0800 Subject: 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. --- stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream.c') 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)); -- cgit v1.2.3