diff options
-rw-r--r-- | Objects/stringobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 1f1a41b..eecb006 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -832,8 +832,10 @@ PyString_Format(format, args) goto error; } width = PyInt_AsLong(v); - if (width < 0) - width = 0; + if (width < 0) { + flags |= F_LJUST; + width = -width; + } if (--fmtcnt >= 0) c = *fmt++; } |