From dd1bef3498110ef0b30121943f064801b8206585 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 2 Apr 2010 10:43:08 +0200 Subject: [PATCH] msi: Reset the MsiEnumPatchesExW index on failure. --- dlls/msi/registry.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 3e03ecf7c65..7a4c3f877a4 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; }