1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Modify number formatting so that 1e-3 renders as 0.001, not .001

This commit is contained in:
Stephen Dolan
2012-09-03 13:57:53 +01:00
parent 6041fd7661
commit cf004c2b3a

View File

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