Hans Leidekker : msi: Fix install state detection for registry components.
Alexandre Julliard
julliard at winehq.org
Fri Apr 20 12:49:27 CDT 2012
Module: wine
Branch: master
Commit: fc73c9db0aeeedc4084e37e7b8493f9e8d94ac00
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fc73c9db0aeeedc4084e37e7b8493f9e8d94ac00
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Apr 20 10:55:52 2012 +0200
msi: Fix install state detection for registry components.
---
dlls/msi/msi.c | 2 +-
dlls/msi/tests/msi.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c
index 4d18265..4783573 100644
--- a/dlls/msi/msi.c
+++ b/dlls/msi/msi.c
@@ -2217,7 +2217,7 @@ UINT WINAPI MsiQueryComponentStateW(LPCWSTR szProductCode,
else
{
if (lstrlenW(val) > 2 &&
- val[0] >= '0' && val[0] <= '9' && val[1] >= '0' && val[1] <= '9')
+ val[0] >= '0' && val[0] <= '9' && val[1] >= '0' && val[1] <= '9' && val[2] != ':')
{
*pdwState = INSTALLSTATE_SOURCE;
}
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index 8768d2a..f7d0717 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -1646,10 +1646,10 @@ static void test_MsiQueryComponentState(void)
ok(state == INSTALLSTATE_SOURCE, "Expected INSTALLSTATE_SOURCE, got %d\n", state);
ok(error == 0xdeadbeef, "expected 0xdeadbeef, got %u\n", error);
- res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01", 3);
+ res = RegSetValueExA(compkey, prod_squashed, 0, REG_SZ, (const BYTE *)"01:", 4);
ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
- /* bad INSTALLSTATE_SOURCE */
+ /* registry component */
state = MAGIC_ERROR;
SetLastError(0xdeadbeef);
r = pMsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, component, &state);
More information about the wine-cvs
mailing list