Fix "numberf" function to correctly handle 'g' format specifier.
Debugged by Michael Fritscher <michael(a)fritscher.net>et>.
Modified: trunk/reactos/lib/crt/stdio/vfprintf.c
Modified: trunk/reactos/lib/crt/stdio/vfwprint.c
_____
Modified: trunk/reactos/lib/crt/stdio/vfprintf.c
--- trunk/reactos/lib/crt/stdio/vfprintf.c 2005-09-17 10:55:29 UTC
(rev 17893)
+++ trunk/reactos/lib/crt/stdio/vfprintf.c 2005-09-17 11:20:25 UTC
(rev 17894)
@@ -225,6 +225,8 @@
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
+ else
+ exp_sign = 'f';
}
if ( exp_sign == 'e' || exp_sign == 'E' ) {
_____
Modified: trunk/reactos/lib/crt/stdio/vfwprint.c
--- trunk/reactos/lib/crt/stdio/vfwprint.c 2005-09-17 10:55:29 UTC
(rev 17893)
+++ trunk/reactos/lib/crt/stdio/vfwprint.c 2005-09-17 11:20:25 UTC
(rev 17894)
@@ -238,6 +238,8 @@
type |= ZEROTRUNC;
if ( exponent < -4 || fabs(exponent) >= precision )
exp_sign -= 2; // g -> e and G -> E
+ else
+ exp_sign = 'f';
}
if ( exp_sign == L'e' || exp_sign == L'E' ) {