diff options
author | Eike Rathke <erack@redhat.com> | 2018-06-18 13:53:04 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-27 06:40:32 +0200 |
commit | ef54167de9b142e29e58c73e46c0741372767b32 (patch) | |
tree | def9ee7e34aa96e5735b5f8d945ba30a15aef67e /sal | |
parent | 6814f2c4940246723c7f4c54b7ddf60455550fc8 (diff) |
Resolves: tdf#118073 one leading 0 is significant for 0.
Regression from
commit 9a6527a98fb968b3fe6bc293ff7520a9480d43d0
CommitDate: Mon Jun 27 21:57:52 2016 +0200
stringToDouble() do not parse separator without digit as 0.0
Change-Id: I9d90aedc324ef0938297224297d89817e3fd1e90
Reviewed-on: https://gerrit.libreoffice.org/56028
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 5c0783cecb0b141885a25ca26220614ad3125f8e)
Reviewed-on: https://gerrit.libreoffice.org/56044
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 98bcbd756bb7222578f1e5f12bb3759337a15c0b)
Diffstat (limited to 'sal')
-rw-r--r-- | sal/rtl/math.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index 96c5843dcfea..2cf2711662d6 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -816,7 +816,7 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd, ++p; } - CharT const * pFirstSignificant = p; + CharT const * pFirstSignificant = ((p > pBegin && *(p-1) == CharT('0')) ? p-1 : p); long nValExp = 0; // carry along exponent of mantissa // integer part of mantissa |