[goffice] dtoa: another fix from musl



commit 536b0561de1039235978f5cb412cb7f91d9d61d7
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 7 15:28:39 2014 -0400

    dtoa: another fix from musl

 ChangeLog              |    2 +-
 goffice/math/go-dtoa.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 8758e40..ccf2cb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
 2014-04-07  Morten Welinder  <terra gnome org>
 
-       * goffice/math/go-dtoa.c (fmt_fp): Two fixes from musl.  (One we
+       * goffice/math/go-dtoa.c (fmt_fp): Three fixes from musl.  (One we
        already had.)
 
        * goffice/app/go-plugin.c (go_plugin_db_deactivate_plugin_list):
diff --git a/goffice/math/go-dtoa.c b/goffice/math/go-dtoa.c
index ec8d093..457308d 100644
--- a/goffice/math/go-dtoa.c
+++ b/goffice/math/go-dtoa.c
@@ -242,8 +242,8 @@ static int fmt_fp(FAKE_FILE *f, long double y, int w, int p, int fl, int t)
                        *d = x % 1000000000;
                        carry = x / 1000000000;
                }
-               if (!z[-1] && z>a) z--;
                if (carry) *--a = carry;
+               while (z>a && !z[-1]) z--;
                e2-=sh;
        }
        while (e2<0) {


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