John DENKER: validate_format(): handle multiple flags correctly
This commit is contained in:
parent
d1dfc42dce
commit
4ba64132b9
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ validate_format(const char *f)
|
||||||
}
|
}
|
||||||
if (*f++ != '%')
|
if (*f++ != '%')
|
||||||
return f_INVALID;
|
return f_INVALID;
|
||||||
if (*f == ' ' || *f == '+' || *f == '-' || *f == '#')
|
while (*f == ' ' || *f == '+' || *f == '-' || *f == '#' || *f == '0')
|
||||||
f++;
|
f++;
|
||||||
while (*f && isdigit(*f))
|
while (*f && isdigit(*f))
|
||||||
f++;
|
f++;
|
||||||
|
|
Loading…
Add table
Reference in a new issue