Open StephenCWills opened 7 months ago
nxdk uses PDClib, which doesn't have strtod
but they have a draft implementation:
It'd probably be best to submit a PR to PDClib directly.
I found high quality public domain implementations of float<->string conversions in sqlite https://github.com/DevSolar/pdclib/issues/5#issuecomment-1950136787
Sent a PR to PDClib with a partial strtod
implementation based on the one from SQLite https://github.com/DevSolar/pdclib/pull/22
Operating System
Other (please specify)
DevilutionX version
Custom build (please specify commit ID)
Describe
Platform: OG Xbox Commit ID: 55a5337 (no release versions are affected)
The build for OG Xbox fails at startup with the following message.
To Reproduce
Expected Behavior
No response
Additional context
I added some trace logging and found that the assertion is raised here in
LuaInitialize()
.https://github.com/diasurgical/devilutionX/blob/55a5337834a9c26861e3f6db790c8949adef8e20/Source/lua/lua.cpp#L218-L229
I didn't dig any deeper than this since I'm pretty sure it's called by Lua internals. There's likely no reasonable way for us to work around the missing function.
Someone already posted an issue for this a few years back: https://github.com/XboxDev/nxdk/issues/508. We will probably need to submit a PR to have any hope of getting this implemented for 1.6.0. Otherwise, we'll just have to disable Lua on OG Xbox.
Here is the link to their stub for the function. https://github.com/XboxDev/nxdk/blob/ed21e83da43b8b8da14a9a78cf2528d9b5df86a7/lib/xboxrt/libc_extensions/stdlib_ext_.c#L89-L93
Also, this isn't really necessary, but I did take a screenshot of the error earlier so I may as well share it.