Issue 114840 - rtl_math_string/uStringToDouble error handling deviates from strtod
Summary: rtl_math_string/uStringToDouble error handling deviates from strtod
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: 3.4.1
Assignee: ooo
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 21:13 UTC by Stephan Bergmann
Modified: 2017-05-20 09:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
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.