diff options
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index b5abdb6..4e343b2 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -4156,7 +4156,8 @@ formatfloat(char *buf, size_t buflen, int flags, always given), therefore increase the length by one. */ - if ((type == 'g' && buflen <= (size_t)10 + (size_t)prec) || + if (((type == 'g' || type == 'G') && + buflen <= (size_t)10 + (size_t)prec) || (type == 'f' && buflen <= (size_t)53 + (size_t)prec)) { PyErr_SetString(PyExc_OverflowError, "formatted float is too long (precision too large?)"); |