[PATCH 0/1] MR10850: msado15: Correctly increase the cnt value
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> --- dlls/msado15/command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/msado15/command.c b/dlls/msado15/command.c index 0aecf2a7c54..f144f6dc61d 100644 --- a/dlls/msado15/command.c +++ b/dlls/msado15/command.c @@ -227,6 +227,7 @@ static HRESULT WINAPI parameters_Delete(Parameters *iface, VARIANT index) free(para); break; } + cnt++; } return S_OK; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10850
Piotr Caban (@piotr) commented about dlls/msado15/command.c:
free(para); break; } + cnt++;
While the change is correct how about improving the function further. Here's a list of issues with current implementation: * validate index, it's enough to print FIXME message if `V_VT(&index) != VT_I4` and return `E_NOTIMPL` * you can use `LIST_FOR_EACH` instead of `LIST_FOR_EACH_ENTRY_SAFE` * the function should return `MAKE_ADO_HRESULT(adErrItemNotFound)` if the item doesn't exist -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10850#note_139363
participants (3)
-
Alistair Leslie-Hughes -
Alistair Leslie-Hughes (@alesliehughes) -
Piotr Caban (@piotr)