summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
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 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));