From c67ad75985fb69df4af791f575070d4167b9ab87 Mon Sep 17 00:00:00 2001 From: Rolf Kalbermatter Date: Sun, 23 Mar 2003 20:03:30 +0000 Subject: [PATCH] SHInitRestricted() fix boolean error introduced in last patch. --- dlls/shell32/shpolicy.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/shpolicy.c b/dlls/shell32/shpolicy.c index d34817e7559..c1b1cc84631 100644 --- a/dlls/shell32/shpolicy.c +++ b/dlls/shell32/shpolicy.c @@ -865,21 +865,21 @@ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey) TRACE("(%p, %p)\n", unused, inpRegKey); /* first check - if input is non-NULL and points to the secret - key string, then pass. Otherwise return 0. + key string, then pass. Otherwise return 0. */ if (inpRegKey != NULL) { if (SHELL_OsIsUnicode()) { - if (lstrcmpiA((LPSTR)inpRegKey, strRegistryPolicyA) || - lstrcmpiA((LPSTR)inpRegKey, strPolicyA)) + if (lstrcmpiW((LPWSTR)inpRegKey, strRegistryPolicyW) && + lstrcmpiW((LPWSTR)inpRegKey, strPolicyW)) /* doesn't match, fail */ return 0; } else { - if (lstrcmpiW((LPWSTR)inpRegKey, strRegistryPolicyW) || - lstrcmpiW((LPWSTR)inpRegKey, strPolicyW)) + if (lstrcmpiA((LPSTR)inpRegKey, strRegistryPolicyA) && + lstrcmpiA((LPSTR)inpRegKey, strPolicyA)) /* doesn't match, fail */ return 0; }