From 41b17057eff98a603cc4f9dea224f7081ca9fbb4 Mon Sep 17 00:00:00 2001 From: cperciva Date: Sun, 7 Mar 2004 22:22:13 +0000 Subject: Make it possible for the %[eEfgG] formats to not result in an error being reported by /usr/bin/printf. This bug has been around for 22 months... either nobody uses printf with floating-point values, or people are forgetting to check their return codes. Approved by: rwatson (mentor) --- usr.bin/printf/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.bin/printf') diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index cc32e4f..a99958e 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -473,7 +473,7 @@ getdouble(double *dp) *dp = asciicode(); return (0); } - rval = 1; + rval = 0; errno = 0; *dp = strtod(*gargv, &ep); if (ep == *gargv) { -- cgit v1.1