[Git][wine/wine][master] vbscript: Parse double literals via ucrtbase _wcstod_l.
Alexandre Julliard pushed to branch master at wine / wine Commits: 9e2c4771 by Francis De Brabandere at 2026-05-20T18:48:20+02:00 vbscript: Parse double literals via ucrtbase _wcstod_l. The custom pow()-based real-number conversion was historical: when this code was written, wine could not link against ucrtbase, so the lexer reimplemented the conversion. That constraint is gone, and the custom code had two correctness gaps - subnormal literals (e.g. 1e-309) rounded to zero because pow(10, 309) overflows to infinity, and values near DBL_MAX could round through the same infinity edge. Hand the literal span to _wcstod_l with a C locale instead, which handles rounding, subnormals, and overflow per IEEE 754 - and is locale-invariant by construction, matching VBScript source semantics where the decimal separator is always '.' regardless of runtime SetLocale. Above-DBL_MAX literals (1e309, 1.8e308) continue to raise err 1031 as before. - - - - - 4 changed files: - dlls/vbscript/lex.c - dlls/vbscript/tests/lang.vbs - dlls/vbscript/vbscript.h - dlls/vbscript/vbscript_main.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/9e2c47715a224ab08b35a056caa2f40... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/9e2c47715a224ab08b35a056caa2f40... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)