Skip to content

Commit 6e54fcf

Browse files
committed
py: Fix typo printing complex numbers that are purely imaginary.
1 parent d1e443d commit 6e54fcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/objcomplex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ STATIC void complex_print(void (*print)(void *env, const char *fmt, ...), void *
3030
char buf[32];
3131
if (o->real == 0) {
3232
format_float(o->imag, buf, sizeof(buf), 'g', 6, '\0');
33-
print(env, "%s", buf);
33+
print(env, "%sj", buf);
3434
} else {
3535
format_float(o->real, buf, sizeof(buf), 'g', 6, '\0');
3636
print(env, "(%s+", buf);

0 commit comments

Comments
 (0)