vbscript: Return only code part of HRESULT for vbscript errors as Err.number.

This commit is contained in:
Jacek Caban 2014-03-27 14:44:26 +01:00 committed by Alexandre Julliard
parent ccf1567555
commit 4effb57f88

View file

@ -1886,6 +1886,8 @@ static HRESULT Err_HelpFile(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VA
static HRESULT Err_Number(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res)
{
HRESULT hres;
TRACE("\n");
if(!This->desc)
@ -1896,7 +1898,8 @@ static HRESULT Err_Number(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARI
return E_NOTIMPL;
}
return return_int(res, This->desc->ctx->err_number);
hres = This->desc->ctx->err_number;
return return_int(res, HRESULT_FACILITY(hres) == FACILITY_VBS ? HRESULT_CODE(hres) : hres);
}
static HRESULT Err_Source(vbdisp_t *This, VARIANT *args, unsigned args_cnt, VARIANT *res)