jscript: Fixed NULL IDispatch comparistion.

This commit is contained in:
Jacek Caban 2009-09-17 01:06:13 +02:00 committed by Alexandre Julliard
parent dcaf066936
commit 6888ea3913
2 changed files with 4 additions and 2 deletions

View File

@ -261,8 +261,8 @@ static HRESULT disp_cmp(IDispatch *disp1, IDispatch *disp2, BOOL *ret)
return S_OK;
}
if(!disp1) {
*ret = !disp2;
if(!disp1 || !disp2) {
*ret = FALSE;
return S_OK;
}

View File

@ -943,6 +943,8 @@ ok(getVT(true && nullDisp) === "VT_DISPATCH",
"getVT(0 && nullDisp) = " + getVT(true && nullDisp));
ok(!nullDisp === true, "!nullDisp = " + !nullDisp);
ok(String(nullDisp) === "null", "String(nullDisp) = " + String(nullDisp));
ok(nullDisp != new Object(), "nullDisp == new Object()");
ok(new Object() != nullDisp, "new Object() == nullDisp");
function do_test() {}
function nosemicolon() {} nosemicolon();