py: Fix typo printing complex numbers that are purely imaginary.

This commit is contained in:
Damien George 2014-03-29 11:41:38 +00:00
parent d1e443d0bc
commit 6e54fcfd12

View File

@ -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);