printf(1): Fix the printing of floats which I broke back in 2007.
authorSascha Wildner <saw@online.de>
Tue, 23 Nov 2010 09:33:41 +0000 (10:33 +0100)
committerSascha Wildner <saw@online.de>
Tue, 23 Nov 2010 09:36:00 +0000 (10:36 +0100)
I forgot braces in f386bcf2683a4edef25828e3958ba5b087d702d2

usr.bin/printf/printf.c

index 05291f5..5d97ed2 100644 (file)
@@ -456,9 +456,10 @@ getdouble(double *dp)
        char *ep;
        int rval;
 
-       if (!*gargv)
+       if (!*gargv) {
                *dp = 0.0;
                return (0);
+       }
        if (**gargv == '"' || **gargv == '\'') {
                *dp = asciicode();
                return (0);