SHInitRestricted() fix boolean error introduced in last patch.
This commit is contained in:
parent
b56950864b
commit
c67ad75985
|
@ -865,21 +865,21 @@ BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey)
|
||||||
TRACE("(%p, %p)\n", unused, inpRegKey);
|
TRACE("(%p, %p)\n", unused, inpRegKey);
|
||||||
|
|
||||||
/* first check - if input is non-NULL and points to the secret
|
/* 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 (inpRegKey != NULL)
|
||||||
{
|
{
|
||||||
if (SHELL_OsIsUnicode())
|
if (SHELL_OsIsUnicode())
|
||||||
{
|
{
|
||||||
if (lstrcmpiA((LPSTR)inpRegKey, strRegistryPolicyA) ||
|
if (lstrcmpiW((LPWSTR)inpRegKey, strRegistryPolicyW) &&
|
||||||
lstrcmpiA((LPSTR)inpRegKey, strPolicyA))
|
lstrcmpiW((LPWSTR)inpRegKey, strPolicyW))
|
||||||
/* doesn't match, fail */
|
/* doesn't match, fail */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (lstrcmpiW((LPWSTR)inpRegKey, strRegistryPolicyW) ||
|
if (lstrcmpiA((LPSTR)inpRegKey, strRegistryPolicyA) &&
|
||||||
lstrcmpiW((LPWSTR)inpRegKey, strPolicyW))
|
lstrcmpiA((LPSTR)inpRegKey, strPolicyA))
|
||||||
/* doesn't match, fail */
|
/* doesn't match, fail */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue