[gnumeric] Fix near-denormal parsing case.



commit 232b0ed6bd61147dc91058f146a9a1377308e109
Author: Morten Welinder <terra gnome org>
Date:   Wed Aug 17 14:47:23 2022 -0400

    Fix near-denormal parsing case.

 ChangeLog    | 4 ++++
 NEWS         | 1 +
 src/gutils.c | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/ChangeLog b/ChangeLog
index b91119b47..ab9464288 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2022-08-17  Morten Welinder  <terra gnome org>
+
+       * src/gutils.c (gnm_utf8_strto): Handle near-denormal case.
+
 2022-06-06  Morten Welinder  <terra gnome org>
 
        * src/complex.c (gnm_complex_to_string): Use go_dtoa as building
diff --git a/NEWS b/NEWS
index 7a9c19310..5a95b92d4 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Morten:
        * Fix inter-process array paste problem.  [#634]
        * Fix problem with xlsx number format 14.
        * Fix problems with complex number rendering.  [#638]
+       * Fix near-denormal parsing case.  [#656]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.52
diff --git a/src/gutils.c b/src/gutils.c
index 10a2a3010..a9088014e 100644
--- a/src/gutils.c
+++ b/src/gutils.c
@@ -296,7 +296,7 @@ gnm_utf8_strto (const char *s, char **end)
 
 handle_denormal:
        save_errno = errno;
-       if (res != 0 && gnm_abs (res) < GNM_MIN)
+       if (res != 0 && gnm_abs (res) <= GNM_MIN)
                errno = 0;
        else
                errno = save_errno;


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