From 548787c12ded0aac9ff6c2a6202d5155a0afc43e Mon Sep 17 00:00:00 2001 From: hanwen Date: Fri, 10 Jun 2005 13:08:00 +0000 Subject: [PATCH] (precision_string): >? fix. --- ChangeLog | 2 ++ flower/string-convert.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9f8667fad1..a426152b30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-06-10 Han-Wen Nienhuys + * 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. diff --git a/flower/string-convert.cc b/flower/string-convert.cc index 53a255db5b..f1fdb8a67f 100644 --- a/flower/string-convert.cc +++ b/flower/string-convert.cc @@ -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 (); -- 2.11.4.GIT