]> granicus.if.org Git - jq/commitdiff
Modify number formatting so that 1e-3 renders as 0.001, not .001
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 3 Sep 2012 12:57:53 +0000 (13:57 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 3 Sep 2012 12:57:53 +0000 (13:57 +0100)
c/jv_dtoa.c

index c31320247a909552819f31864fa570fffec7fe1f..2c27c8800380474461fd0f1abbaf6f8c8adea51a 100644 (file)
@@ -4247,6 +4247,7 @@ jvp_dtoa
                *b = 0;
                }
        else if (decpt <= 0) {
+               *b++ = '0';
                *b++ = '.';
                for(; decpt < 0; decpt++)
                        *b++ = '0';