mirror of
https://github.com/reactos/wine.git
synced 2024-12-01 07:30:37 +00:00
mshtml: Handle VT_INT/VT_UI4 same way as VT_I4/VT_UINT in IHTMLElementCollection::item.
This commit is contained in:
parent
6e94edd36f
commit
242beac637
@ -419,11 +419,13 @@ static HRESULT WINAPI HTMLElementCollection_item(IHTMLElementCollection *iface,
|
||||
|
||||
switch(V_VT(&name)) {
|
||||
case VT_I4:
|
||||
case VT_INT:
|
||||
if(V_I4(&name) < 0)
|
||||
return E_INVALIDARG;
|
||||
hres = get_item_idx(This, V_I4(&name), pdisp);
|
||||
break;
|
||||
|
||||
case VT_UI4:
|
||||
case VT_UINT:
|
||||
hres = get_item_idx(This, V_UINT(&name), pdisp);
|
||||
break;
|
||||
|
@ -2437,6 +2437,27 @@ static void _test_elem_collection(unsigned line, IUnknown *unk,
|
||||
ok_(__FILE__,line) (hres == S_OK, "item failed: %08x\n", hres);
|
||||
ok_(__FILE__,line) (disp == NULL, "disp != NULL\n");
|
||||
|
||||
V_VT(&name) = VT_UI4;
|
||||
V_I4(&name) = len;
|
||||
disp = (void*)0xdeadbeef;
|
||||
hres = IHTMLElementCollection_item(col, name, index, &disp);
|
||||
ok_(__FILE__,line) (hres == S_OK, "item failed: %08x\n", hres);
|
||||
ok_(__FILE__,line) (disp == NULL, "disp != NULL\n");
|
||||
|
||||
V_VT(&name) = VT_INT;
|
||||
V_I4(&name) = len;
|
||||
disp = (void*)0xdeadbeef;
|
||||
hres = IHTMLElementCollection_item(col, name, index, &disp);
|
||||
ok_(__FILE__,line) (hres == S_OK, "item failed: %08x\n", hres);
|
||||
ok_(__FILE__,line) (disp == NULL, "disp != NULL\n");
|
||||
|
||||
V_VT(&name) = VT_UINT;
|
||||
V_I4(&name) = len;
|
||||
disp = (void*)0xdeadbeef;
|
||||
hres = IHTMLElementCollection_item(col, name, index, &disp);
|
||||
ok_(__FILE__,line) (hres == S_OK, "item failed: %08x\n", hres);
|
||||
ok_(__FILE__,line) (disp == NULL, "disp != NULL\n");
|
||||
|
||||
V_VT(&name) = VT_I4;
|
||||
V_I4(&name) = -1;
|
||||
disp = (void*)0xdeadbeef;
|
||||
|
Loading…
Reference in New Issue
Block a user