]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix the fix :-(
authorGuido van Rossum <guido@python.org>
Thu, 11 Nov 1993 15:03:51 +0000 (15:03 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 11 Nov 1993 15:03:51 +0000 (15:03 +0000)
Objects/stringobject.c

index d40b90814ba3ec59a1f1a6fad42d5acf0d2f686c..ed5af5775f0a1e5fbadf937d2729a41dc463d30e 100644 (file)
@@ -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;