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:
parent
6b03a9495c
commit
24ea306fa6
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue