[goffice] dtoa: fix problem with long double.



commit cb60efc91c27208671a828c7fb8b4a2fd1ed401c
Author: Morten Welinder <terra gnome org>
Date:   Tue Mar 29 17:55:12 2022 -0400

    dtoa: fix problem with long double.

 NEWS                   | 3 +++
 goffice/math/go-dtoa.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/NEWS b/NEWS
index 2d0cf932..970a87b2 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ Morten:
        * Documentation fixes.
        * Fix go_{add,sub}_epsilon{,l} confusion in fallback code for win32.
 
+B.S:
+       * Fix long double problem with go_dtoa.  [#57]
+
 --------------------------------------------------------------------------
 goffice 0.10.51:
 
diff --git a/goffice/math/go-dtoa.c b/goffice/math/go-dtoa.c
index 06e59d1d..64a7d2b3 100644
--- a/goffice/math/go-dtoa.c
+++ b/goffice/math/go-dtoa.c
@@ -497,7 +497,7 @@ go_dtoa (GString *dst, const char *fmt, ...)
        parse_fmt (fmt, args, &is_long, &w, &p, &fl, &t, &d);
        va_end (args);
 
-       if (fl & FLAG_SHORTEST) p = is_long ? 20 : 17;
+       if (fl & FLAG_SHORTEST) p = is_long ? 21 : 17;
        oldlen = (fl & FLAG_TRUNCATE) ? 0 : dst->len;
 
 #ifdef ENSURE_FPU_STATE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]