diff options
author | Guido van Rossum <guido@python.org> | 1993-11-11 15:03:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-11-11 15:03:51 (GMT) |
commit | 71e57d090d070686746ee63b855e38cb337dc5cc (patch) | |
tree | 47f22dd7662d3e260d218361156bdb1a17d7ddc3 /Objects | |
parent | 6938a297dafc4d1809938f5be38c4afa475e776e (diff) | |
download | cpython-71e57d090d070686746ee63b855e38cb337dc5cc.zip cpython-71e57d090d070686746ee63b855e38cb337dc5cc.tar.gz cpython-71e57d090d070686746ee63b855e38cb337dc5cc.tar.bz2 |
Fix the fix :-(
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/stringobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index d40b908..ed5af57 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -818,6 +818,8 @@ formatstring(format, args) res = getstringvalue(result) + reslen - rescnt; } if (sign) { + if (fill != ' ') + *res++ = sign; rescnt--; if (width > len) width--; @@ -828,7 +830,7 @@ formatstring(format, args) *res++ = fill; } while (--width > len); } - if (sign) + if (sign && fill == ' ') *res++ = sign; memcpy(res, buf, len); res += len; |