[PATCH 0/3] MR216: uiautomationcore: More UiaProviderFromIAccessible work.
Huw Davies (@huw)
wine at gitlab.winehq.org
Thu Jun 9 08:37:44 CDT 2022
Huw Davies (@huw) commented about dlls/uiautomationcore/uia_provider.c:
> + variant_init_i4(&cid, CHILDID_SELF);
> + VariantInit(&v);
> + hr = IAccessible_get_accRole(acc, cid, &v);
> + if (SUCCEEDED(hr) && (V_VT(&v) == VT_I4))
> + {
> + VariantInit(&v2);
> + hr = IAccessible_get_accRole(acc2, cid, &v2);
> + if (SUCCEEDED(hr) && (V_VT(&v2) == VT_I4))
> + {
> + if (V_I4(&v) != V_I4(&v2))
> + goto exit;
> +
> + match_count++;
> + }
> + }
> +
This match_count thing looks fragile. Can't you just bail if match fails at any point?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/216#note_1755
More information about the wine-devel
mailing list