diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 09067e9..53f0fb5 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -13583,8 +13583,10 @@ PyUnicode_Format(PyObject *format, PyObject *args) fmtpos++; fmtcnt--; } - if (fmtcnt < 0) + if (fmtcnt < 0) { fmtpos--; + writer.overallocate = 0; + } sublen = fmtpos - nonfmtpos; maxchar = _PyUnicode_FindMaxChar(uformat, nonfmtpos, nonfmtpos + sublen); |