summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/math.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index eef48b57e74e..7b172f1ee1d2 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -817,7 +817,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