summaryrefslogtreecommitdiff
path: root/sal/rtl/source/strtmpl.c
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-06-07 15:40:22 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-06-07 15:40:22 +0000
commitf7a18669c0e360c4edbc629d3fce31e98a886b19 (patch)
tree42afea0fe1d85fe12cb9700476ee6920e6f23026 /sal/rtl/source/strtmpl.c
parentb538e00efdafc61ccd36238c6e1eee26d7ecf13f (diff)
#99940# toDouble(): leading whitespace, zeros
Diffstat (limited to 'sal/rtl/source/strtmpl.c')
-rw-r--r--sal/rtl/source/strtmpl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sal/rtl/source/strtmpl.c b/sal/rtl/source/strtmpl.c
index ef8ba6c1b..389f7825a 100644
--- a/sal/rtl/source/strtmpl.c
+++ b/sal/rtl/source/strtmpl.c
@@ -2,9 +2,9 @@
*
* $RCSfile: strtmpl.c,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: sb $ $Date: 2002-03-28 10:31:15 $
+ * last change: $Author: dbo $ $Date: 2002-06-07 16:40:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1060,9 +1060,7 @@ static double IMPL_RTL_STRNAME( ImplStringToDouble )( const IMPL_RTL_STRCODE* pS
double fDiv = 0.1;
/* Skip whitespaces and leading zeros */
- while ( *pStr &&
- rtl_ImplIsWhitespace( IMPL_RTL_USTRCODE( *pStr ) ) &&
- (*pStr == 0) )
+ while ( *pStr && (rtl_ImplIsWhitespace( IMPL_RTL_USTRCODE( *pStr ) ) || (*pStr == '0')) )
pStr++;
while ( *pStr )
@@ -1132,6 +1130,7 @@ static double IMPL_RTL_STRNAME( ImplStringToDouble )( const IMPL_RTL_STRCODE* pS
if ( bNeg )
return -fRet;
else
+#
return fRet;
}