DevSolar / pdclib

The Public Domain C Library
https://pdclib.rootdirectory.de
Creative Commons Zero v1.0 Universal
224 stars 41 forks source link

Fix broken hex pre-scanning for strtod #23

Closed thrimbor closed 6 months ago

thrimbor commented 6 months ago

This fixes a bug in _PDCLIB_strtod_scan which incorrectly split hexadecimal floats when there were no digits between the 0x prefix and the decimal point. Previously it would just detect the zero in the prefix, and all the end pointers would point at the x. Test case is included.

DevSolar commented 6 months ago

You guys absolutely blow my mind. I had basically shelved this project as I thought nobody was using it anymore anyway, and the whole FP support turned out to look a bit too much like real work... seems that there's still demand for this if you're poking around in half-finished WiP, so I will pick it up again.