[9/9] msi: Reset the MsiEnumPatchesExW index on failure.
Hans Leidekker
hans at codeweavers.com
Fri Apr 2 03:43:08 CDT 2010
---
dlls/msi/registry.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index 3e03ecf..7a4c3f8 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -2041,7 +2041,7 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
DWORD idx = 0;
UINT r;
- static int last_index = 0;
+ static DWORD last_index;
TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n",
debugstr_w(szProductCode), debugstr_w(szUserSid), dwContext, dwFilter,
@@ -2077,6 +2077,8 @@ UINT WINAPI MsiEnumPatchesExW(LPCWSTR szProductCode, LPCWSTR szUserSid,
if (r == ERROR_SUCCESS)
last_index = dwIndex;
+ else
+ last_index = 0;
return r;
}
--
1.7.0
More information about the wine-patches
mailing list