bug in ozostream.cc @ mozart-1-3-0-fixes

Filip Konvicka filip.konvicka.removethisantispamtoken at logis.cz
Sun Apr 16 10:55:36 CEST 2006


Hi,

the recent Mozart 1-3-0-fixes prints some garbage instead of floats 
(like "$.*1$g"). See the included patch.

Cheers,
Filip
-------------- next part --------------
Index: platform/emulator/ozostream.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/ozostream.cc,v
retrieving revision 1.18.18.1
diff -u -r1.18.18.1 ozostream.cc
--- platform/emulator/ozostream.cc	21 Feb 2006 09:36:05 -0000	1.18.18.1
+++ platform/emulator/ozostream.cc	16 Apr 2006 08:43:22 -0000
@@ -83,9 +83,9 @@
 {
   char buf[100];
   if (ozconf.printScientificFloats)
-    sprintf(buf,"%2$.*1$e",ozconf.printFloatPrecision,d);
+    sprintf(buf,"%2.*e",ozconf.printFloatPrecision,d);
   else
-    sprintf(buf,"%2$.*1$g",ozconf.printFloatPrecision,d);
+    sprintf(buf,"%2.*g",ozconf.printFloatPrecision,d);
   return *this << buf;
 }
 


More information about the mozart-hackers mailing list