leading space fix
This commit is contained in:
parent
2ca369cc49
commit
a3c9a7a159
@ -166,12 +166,13 @@ static void strfmt(char *str, const char *fmt, ...) {
|
|||||||
ival = va_arg(vp, int);
|
ival = va_arg(vp, int);
|
||||||
bool padding = true;
|
bool padding = true;
|
||||||
while(ilen) {
|
while(ilen) {
|
||||||
ival = (ival % pow[ilen]) / pow[ilen-1];
|
ival %= pow[ilen];
|
||||||
if(ival)
|
int cval = ival / pow[ilen-1];
|
||||||
|
if(cval)
|
||||||
padding = false;
|
padding = false;
|
||||||
if(--ilen and padding)
|
if(--ilen and padding)
|
||||||
ival = ' ' - '0';
|
cval = ' ' - '0';
|
||||||
*str++ = (char)('0' + ival);
|
*str++ = (char)('0' + cval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user