From 3259365bf1581b530070efd75ecaffbb3bb1d49e Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Fri, 3 Oct 2014 05:17:03 +0800 Subject: [PATCH 2/5] jscript: Ignore BOM mark in parseFloat. To: wine-patches Reply-To: wine-devel Cc: Qian Hong --- dlls/jscript/global.c | 2 +- dlls/jscript/tests/run.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/global.c b/dlls/jscript/global.c index 4d1350f..e0300ac 100644 --- a/dlls/jscript/global.c +++ b/dlls/jscript/global.c @@ -538,7 +538,7 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag if(FAILED(hres)) return hres; - while(isspaceW(*str)) str++; + while(is_jsspaceW(*str)) str++; if(*str == '+') str++; diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index be6bce5..9dd4561 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -1994,6 +1994,9 @@ static const struct spaces_test spaces_tests[] = { var a = f( 1 , 2 );\ ok(a == 3, \"Function returned \"+a);\ reportSuccess();", S_OK}, + {"var a = parseFloat(\" 3.14 \");\ + ok(a == 3.14, \"returned \"+a);\ + reportSuccess();", S_OK}, {{0}} }; -- 1.9.1