Commit 96ace8cb authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use jsstr_flatten to access string buffer in jsutils.c.

parent b11d47fc
...@@ -502,16 +502,15 @@ static int hex_to_int(WCHAR c) ...@@ -502,16 +502,15 @@ static int hex_to_int(WCHAR c)
/* ECMA-262 3rd Edition 9.3.1 */ /* ECMA-262 3rd Edition 9.3.1 */
static HRESULT str_to_number(jsstr_t *str, double *ret) static HRESULT str_to_number(jsstr_t *str, double *ret)
{ {
const WCHAR *ptr = str->str; const WCHAR *ptr;
BOOL neg = FALSE; BOOL neg = FALSE;
DOUBLE d = 0.0; DOUBLE d = 0.0;
static const WCHAR infinityW[] = {'I','n','f','i','n','i','t','y'}; static const WCHAR infinityW[] = {'I','n','f','i','n','i','t','y'};
if(!ptr) { ptr = jsstr_flatten(str);
*ret = 0; if(!ptr)
return S_OK; return E_OUTOFMEMORY;
}
while(isspaceW(*ptr)) while(isspaceW(*ptr))
ptr++; ptr++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment