[ros-diffs] [navaraf] 17894: Fix "numberf" function to correctly
handle 'g' format specifier. Debugged by Michael Fritscher
<michael@fritscher.net>.
navaraf at svn.reactos.com
navaraf at svn.reactos.com
Sat Sep 17 13:20:40 CEST 2005
Fix "numberf" function to correctly handle 'g' format specifier.
Debugged by Michael Fritscher <michael at fritscher.net>.
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' ) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050917/e2437b4b/attachment.html
More information about the Ros-diffs
mailing list