Commit e3b94200 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

comctl32: In COMBOEX_FindStringExact do not try to get text from invalid items.

parent 872b4d40
......@@ -860,10 +860,12 @@ COMBOEX_FindStringExact (COMBOEX_INFO *infoPtr, INT start, LPCWSTR str)
/* now search from after starting loc and wrapping back to start */
for(i=start+1; i<count; i++) {
CBE_ITEMDATA *item = get_item_data(infoPtr, i);
if ((LRESULT)item == CB_ERR) continue;
if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i;
}
for(i=0; i<=start; i++) {
CBE_ITEMDATA *item = get_item_data(infoPtr, i);
if ((LRESULT)item == CB_ERR) continue;
if (cmptext(COMBOEX_GetText(infoPtr, item), str) == 0) return i;
}
return CB_ERR;
......
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