Apache OpenOffice (AOO) Bugzilla – Issue 114840
rtl_math_string/uStringToDouble error handling deviates from strtod
Last modified: 2017-05-20 09:13:56 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.
.
fixed as <http://hg.services.openoffice.org/cws/sb132/rev/444af5a5d031>, incl. test case
+ <http://hg.services.openoffice.org/cws/sb132/rev/7ee0fc0cabc8>
@er: please verify
All good.