fltfmt: %.ng is supposed to print a number with n significant figures, but it prints it with n+1. This fixes that behaviour.

This commit is contained in:
ppatience0 2013-02-27 16:15:18 -05:00
parent 6b03a9495c
commit 24ea306fa6

View file

@ -187,6 +187,8 @@ found:
* c3 digits of trailing '0'
* c4 digits after '.'
*/
if(chr == 'g') /* Significant figures. */
prec--;
c1 = 0;
c2 = prec + 1;
c3 = 0;