mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
jscript: Use jsstr_flatten to access string buffer in jsutils.c.
This commit is contained in:
parent
b11d47fc90
commit
96ace8cbcb
1 changed files with 4 additions and 5 deletions
|
@ -502,16 +502,15 @@ static int hex_to_int(WCHAR c)
|
|||
/* ECMA-262 3rd Edition 9.3.1 */
|
||||
static HRESULT str_to_number(jsstr_t *str, double *ret)
|
||||
{
|
||||
const WCHAR *ptr = str->str;
|
||||
const WCHAR *ptr;
|
||||
BOOL neg = FALSE;
|
||||
DOUBLE d = 0.0;
|
||||
|
||||
static const WCHAR infinityW[] = {'I','n','f','i','n','i','t','y'};
|
||||
|
||||
if(!ptr) {
|
||||
*ret = 0;
|
||||
return S_OK;
|
||||
}
|
||||
ptr = jsstr_flatten(str);
|
||||
if(!ptr)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
while(isspaceW(*ptr))
|
||||
ptr++;
|
||||
|
|
Loading…
Reference in a new issue