[host] service: fix adjustPriv return value

When OpenProcessToken fails, the function returned -1, which would be true
when converted to bool. This is wrong, and it should be returning false.
This commit is contained in:
Quantum authored and Geoffrey McRae committed 2021-07-20 11:29:32 +10:00
1 parent 563ad18f4e
commit d57b5a320e
1 file changed
+1 -1
+1 -1
View File
@@ -111,7 +111,7 @@ bool adjustPriv(const char * name, DWORD attributes)
{
doLog("failed to open the process\n");
winerr();
return -1;
return false;
}
if (!LookupPrivilegeValueA(NULL, name, &luid))