summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index f1dcfe9..304ea74 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -9381,6 +9381,7 @@ _PyUnicode_InsertThousandsGrouping(
PyObject *thousands_sep,
Py_UCS4 *maxchar)
{
+ min_width = Py_MAX(0, min_width);
if (writer) {
assert(digits != NULL);
assert(maxchar == NULL);
@@ -9391,7 +9392,6 @@ _PyUnicode_InsertThousandsGrouping(
}
assert(0 <= d_pos);
assert(0 <= n_digits);
- assert(0 <= min_width);
assert(grouping != NULL);
if (digits != NULL) {