[xml] A couple more XPath Float fixes



Hi

I've caught a couple more problems with the floating point numbers in XPath.
These only occurred on Windows, not Linux.

1) "-number('f')" returned 0 instead of NaN
Added extra special case to xmlXPathValueFlipSign() to handle NaNs

2) "1 div number('f')" returned 0 instead of NaN
Added extra special case to xmlXPathDivValues() to handle NaNs

3) "number()" could crash in certain cases
Put test in xmlXPathStringEvalNumber to return 0 if string is NULL

I've also added a couple of extra test cases to check for these problems.
Diff file attached.

Thanks,
Richard

Attachment: more_xpath_floats.diff
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]