Commit 5f9f9a45 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Properly support missing array elements in stringify_array.

parent 25cf6b7f
......@@ -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))
return hres;
hres = stringify(ctx, 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;
if(hres == S_FALSE && !append_string(ctx, nullW))
return E_OUTOFMEMORY;
}
}
if((length && *ctx->gap && !append_char(ctx, '\n')) || !append_char(ctx, ']'))
......
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