From cccb7190844a0a2bd0f76db0184056d92571b32d Mon Sep 17 00:00:00 2001 From: Qian Hong Date: Thu, 2 Oct 2014 18:42:52 +0800 Subject: [PATCH 2/2] 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 | 1 + 2 files changed, 2 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 abe5521..422c495 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -1985,6 +1985,7 @@ static const struct spaces_test spaces_tests[] = { {{'v','a','r',' ','a',' ','=',' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',SPACE_HOLDER,')',';','\0'}, S_OK}, {{'v','a','r',' ','a',' ','=',SPACE_HOLDER,' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',SPACE_HOLDER,')',';','\0'}, S_OK}, {{SPACE_HOLDER,'v','a','r',' ','a',' ','=',SPACE_HOLDER,SPACE_HOLDER,' ','1',';',' ','r','e','p','o','r','t','S','u','c','c','e','s','s','(',SPACE_HOLDER,')',';','\0'}, S_OK}, + {{'v','a','r',' ','a',' ','=',' ','p','a','r','s','e','F','l','o','a','t','(','"',SPACE_HOLDER,'3','.','1','4',SPACE_HOLDER,'"',')',';','o','k','(','a','=','=','3','.','1','4',',',' ','"','h','a','h','a','"',')',';','r','e','p','o','r','t','S','u','c','c','e','s','s','(',')',';','\0'}, S_OK}, {{0}} }; -- 1.9.1