New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing doubles breaks with certain locales #34

bpeel opened this Issue Sep 28, 2018 · 0 comments


None yet
1 participant

bpeel commented Sep 28, 2018

VkRunner has the classic parser bug of using strtod and breaking under locales that don’t use a full stop (.) as the decimal separator. This doesn’t really matter for the standalone executable because it doesn’t call setlocale, but for the library version this could go badly wrong.

bpeel added a commit that referenced this issue Oct 2, 2018

Use strtod_l to force the C locale
The normal strtod is locale-sensitive which means that on locales that
don’t use the full stop (.) as a separator it won’t be able to parse
doubles in the script properly. This patch makes it create a C locale
on the vr_config and use it via strtod_l. This function is a GLIBC
extension so it is conditionally compiled when using GLIBC.

Fixes #34

@bpeel bpeel closed this in 626b679 Oct 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment