Issue 114840

Summary: rtl_math_string/uStringToDouble error handling deviates from strtod
Product: porting Reporter: Stephan Bergmann <stephan.bergmann.secondary>
Component: codeAssignee: ooo
Status: CLOSED FIXED QA Contact: issues@porting <issues>
Severity: Trivial    
Priority: P3 CC: IngridvdM, issues
Version: current   
Target Milestone: 3.4.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Stephan Bergmann 2010-09-29 21:13:11 UTC
With C99 strtod(const char * restrict nptr, char ** restrict endptr), if the nptr string does not contain an 
appropriate subsequence for conversion, *endptr is always set to nptr, even if there is leading whitespace 
in the string (see section 7.20.1.3 of the C99 standard).  With rtl_math_stringToDouble and 
rtl_math_uStringToDouble, the corresponding *pParsedEnd would instead point past the initial whitespace.  
This is apparently an unintended deviation from the strtod behavior, on which these functions are modeled, 
as stated.
Comment 1 Stephan Bergmann 2010-09-29 21:26:57 UTC
.
Comment 2 Stephan Bergmann 2010-10-28 14:53:59 UTC
fixed as <http://hg.services.openoffice.org/cws/sb132/rev/444af5a5d031>, incl.
test case
Comment 3 Stephan Bergmann 2010-10-29 08:53:55 UTC
+ <http://hg.services.openoffice.org/cws/sb132/rev/7ee0fc0cabc8>
Comment 4 Stephan Bergmann 2010-11-02 10:22:14 UTC
@er: please verify
Comment 5 ooo 2010-11-04 12:49:44 UTC
All good.