Commit bfec9c61 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed dispid lookup in_cp_event.

parent 451f5b4a
...@@ -780,7 +780,7 @@ static HRESULT call_cp_func(IDispatch *disp, DISPID dispid) ...@@ -780,7 +780,7 @@ static HRESULT call_cp_func(IDispatch *disp, DISPID dispid)
static BOOL is_cp_event(ConnectionPoint *cp, DISPID dispid) static BOOL is_cp_event(ConnectionPoint *cp, DISPID dispid)
{ {
cp_static_data_t *data; cp_static_data_t *data;
unsigned min, max, i; int min, max, i;
HRESULT hres; HRESULT hres;
data = cp->data; data = cp->data;
...@@ -790,11 +790,11 @@ static BOOL is_cp_event(ConnectionPoint *cp, DISPID dispid) ...@@ -790,11 +790,11 @@ static BOOL is_cp_event(ConnectionPoint *cp, DISPID dispid)
if(!data->ids) { if(!data->ids) {
hres = get_dispids(data->tid, &data->id_cnt, &data->ids); hres = get_dispids(data->tid, &data->id_cnt, &data->ids);
if(FAILED(hres)) if(FAILED(hres))
return hres; return FALSE;
} }
min = 0; min = 0;
max = data->id_cnt; max = data->id_cnt-1;
while(min <= max) { while(min <= max) {
i = (min+max)/2; i = (min+max)/2;
if(data->ids[i] == dispid) if(data->ids[i] == dispid)
......
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