summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--py/objcomplex.c2
1 files changed, 1 insertions, 1 deletions
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);