diff options
author | jilles <jilles@FreeBSD.org> | 2014-05-13 21:24:55 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-05-13 21:24:55 +0000 |
commit | 2096c463802cf27feb8a38c7e34dc14d3a65fa50 (patch) | |
tree | 923641f6e9b373b08ce40ca6230cb1b056bd61c2 /usr.bin/printf | |
parent | f14c076ec7c8287b78e1359e537ee6d6e2adb9ea (diff) | |
download | FreeBSD-src-2096c463802cf27feb8a38c7e34dc14d3a65fa50.zip FreeBSD-src-2096c463802cf27feb8a38c7e34dc14d3a65fa50.tar.gz |
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.
Diffstat (limited to 'usr.bin/printf')
-rw-r--r-- | usr.bin/printf/printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 7a7e055..956e8a3 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -575,7 +575,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int signedconv) int rval; if (!*gargv) { - *ip = 0; + *ip = *uip = 0; return (0); } if (**gargv == '"' || **gargv == '\'') { |