[PATCH] fix number conversion in non-english locales
Marcus Meissner
meissner at suse.de
Sun Sep 28 10:15:55 CDT 2008
Hi,
this fixes jscript/run failures with LANG=de_DE.utf8
by using a english locale and no user override
for real number -> string conversion.
../../../tools/runtest -q -P wine -M jscript.dll -T ../../.. -p jscript_test.exe.so run.c && touch run.ok
run.c:307: Test failed: lang.js: '' + 0.5 = 0,5
run.c:307: Test failed: lang.js: '' + (-0.5432) = -0,5432
make: *** [run.ok] Fehler 2
Ciao, Marcus
---
dlls/jscript/jsutils.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c
index 32b877b..c6f4b9c 100644
--- a/dlls/jscript/jsutils.c
+++ b/dlls/jscript/jsutils.c
@@ -458,7 +458,7 @@ HRESULT to_string(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, BSTR *str)
HRESULT hres;
V_VT(&strv) = VT_EMPTY;
- hres = VariantChangeType(&strv, v, 0, VT_BSTR);
+ hres = VariantChangeTypeEx(&strv, v, MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT), 0, VT_BSTR);
if(FAILED(hres))
return hres;
--
1.5.6
More information about the wine-patches
mailing list