Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6938a29 commit 71e57d0Copy full SHA for 71e57d0
1 file changed
Objects/stringobject.c
@@ -818,6 +818,8 @@ formatstring(format, args)
818
res = getstringvalue(result) + reslen - rescnt;
819
}
820
if (sign) {
821
+ if (fill != ' ')
822
+ *res++ = sign;
823
rescnt--;
824
if (width > len)
825
width--;
@@ -828,7 +830,7 @@ formatstring(format, args)
828
830
*res++ = fill;
829
831
} while (--width > len);
832
- if (sign)
833
+ if (sign && fill == ' ')
834
*res++ = sign;
835
memcpy(res, buf, len);
836
res += len;
0 commit comments