summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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