shell32: SHInitRestricted() fix boolean error introduced in last patch

Rolf Kalbermatter rolf.kalbermatter at citeng.com
Sun Mar 23 07:37:32 CST 2003


Changelog
  * dlls/shell32/shpolicy.c
     SHInitRestricted() fix boolean error introduced in last patch

License: X11, LGPL

Rolf Kalbermatter

Index: dlls/shell32/shpolicy.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shpolicy.c,v
retrieving revision 1.13
diff -u -r1.13 shpolicy.c
--- dlls/shell32/shpolicy.c	21 Mar 2003 21:26:26 -0000	1.13
+++ dlls/shell32/shpolicy.c	23 Mar 2003 13:37:37 -0000
@@ -865,21 +866,21 @@
 	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;
 	  }




More information about the wine-patches mailing list