mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 02:48:20 +00:00
jscript: Properly support missing array elements in stringify_array.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
25cf6b7f4d
commit
5f9f9a45e9
|
@ -545,15 +545,18 @@ static HRESULT stringify_array(stringify_ctx_t *ctx, jsdisp_t *obj)
|
|||
}
|
||||
|
||||
hres = jsdisp_get_idx(obj, i, &val);
|
||||
if(FAILED(hres))
|
||||
if(SUCCEEDED(hres)) {
|
||||
hres = stringify(ctx, val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
if(hres == S_FALSE && !append_string(ctx, nullW))
|
||||
return E_OUTOFMEMORY;
|
||||
}else if(hres == DISP_E_UNKNOWNNAME) {
|
||||
if(!append_string(ctx, nullW))
|
||||
return E_OUTOFMEMORY;
|
||||
}else {
|
||||
return hres;
|
||||
|
||||
hres = stringify(ctx, val);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
if(hres == S_FALSE && !append_string(ctx, nullW))
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
if((length && *ctx->gap && !append_char(ctx, '\n')) || !append_char(ctx, ']'))
|
||||
|
|
Loading…
Reference in a new issue