summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpz.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/mpz.c')
-rw-r--r--py/mpz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/mpz.c b/py/mpz.c
index 750664ad9a..084aebda9e 100644
--- a/py/mpz.c
+++ b/py/mpz.c
@@ -1717,7 +1717,7 @@ size_t mpz_as_str_inpl(const mpz_t *i, unsigned int base, const char *prefix, ch
break;
}
}
- if (comma && (s - last_comma) == 3) {
+ if (!done && comma && (s - last_comma) == 3) {
*s++ = comma;
last_comma = s;
}