Fix the fix :-(

This commit is contained in:
Guido van Rossum 1993-11-11 15:03:51 +00:00
parent 6938a297da
commit 71e57d090d
1 changed files with 3 additions and 1 deletions

View File

@ -818,6 +818,8 @@ formatstring(format, args)
res = getstringvalue(result) + reslen - rescnt; res = getstringvalue(result) + reslen - rescnt;
} }
if (sign) { if (sign) {
if (fill != ' ')
*res++ = sign;
rescnt--; rescnt--;
if (width > len) if (width > len)
width--; width--;
@ -828,7 +830,7 @@ formatstring(format, args)
*res++ = fill; *res++ = fill;
} while (--width > len); } while (--width > len);
} }
if (sign) if (sign && fill == ' ')
*res++ = sign; *res++ = sign;
memcpy(res, buf, len); memcpy(res, buf, len);
res += len; res += len;