]> git.donarmstrong.com Git - lilypond.git/commitdiff
(precision_string): >? fix.
authorhanwen <hanwen>
Fri, 10 Jun 2005 13:08:01 +0000 (13:08 +0000)
committerhanwen <hanwen>
Fri, 10 Jun 2005 13:08:01 +0000 (13:08 +0000)
ChangeLog
flower/string-convert.cc

index 9f8667fad10bf97fc09861f6051c3529fde4560f..a426152b304093fae14d22f7ff26d2e6953cf40e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-06-10  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * flower/string-convert.cc (precision_string): >? fix.
+
        * scm/ps-to-png.scm (make-ps-images): search-gs for multipage too.
        (make-ps-images): add verbose -q too.
 
index 53a255db5bd3fb4b634bdbead210852e263186ac..f1fdb8a67fbc3c068a25e3408b5be399a7cca31d 100644 (file)
@@ -285,7 +285,7 @@ String_convert::pointer_string (void const *l)
 String
 String_convert::precision_string (double x, int n)
 {
-  String format = "%." + to_string (0 >? n - 1) + "e";
+  String format = "%." + to_string (max (0, n - 1)) + "e";
   String str = double_string (abs (x), format.to_str0 ());
 
   int exp = str.right_string (3).to_int ();