printf: Fix missing arguments for %u/%o/%x/%X after r265592.
If a numeric argument is missing, zero should be assumed, for signed as well as unsigned conversions. This fixes the 'zero' regression tests. r265592 erroneously reverted r244407.
This commit is contained in:
parent
0dd10c0047
commit
4e4d980265
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265977
@ -575,7 +575,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int signedconv)
|
|||||||
int rval;
|
int rval;
|
||||||
|
|
||||||
if (!*gargv) {
|
if (!*gargv) {
|
||||||
*ip = 0;
|
*ip = *uip = 0;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (**gargv == '"' || **gargv == '\'') {
|
if (**gargv == '"' || **gargv == '\'') {
|
||||||
|
Loading…
Reference in New Issue
Block a user