diff --git a/py/objcomplex.c b/py/objcomplex.c index feec9c11a3..91f6b081e3 100644 --- a/py/objcomplex.c +++ b/py/objcomplex.c @@ -34,7 +34,7 @@ STATIC void complex_print(void (*print)(void *env, const char *fmt, ...), void * } else { format_float(o->real, buf, sizeof(buf), 'g', 6, '\0'); print(env, "(%s+", buf); - format_float(o->real, buf, sizeof(buf), 'g', 6, '\0'); + format_float(o->imag, buf, sizeof(buf), 'g', 6, '\0'); print(env, "%sj)", buf); } #else