diff --git a/py/objcomplex.c b/py/objcomplex.c
index feec9c11a3f955ab0d4f02690bfba423b9386d7b..91f6b081e358b5f01c9e8a3f773877fd64c91be1 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