From 6e54fcfd124ec380621f0bd3daeb934525b56638 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 29 Mar 2014 11:41:38 +0000 Subject: [PATCH] py: Fix typo printing complex numbers that are purely imaginary. --- py/objcomplex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/objcomplex.c b/py/objcomplex.c index 91f6b081e3..c2b9d49104 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -30,7 +30,7 @@ STATIC void complex_print(void (*print)(void *env, const char *fmt, ...), void * char buf[32]; if (o->real == 0) { format_float(o->imag, buf, sizeof(buf), 'g', 6, '\0'); - print(env, "%s", buf); + print(env, "%sj", buf); } else { format_float(o->real, buf, sizeof(buf), 'g', 6, '\0'); print(env, "(%s+", buf);