[TASKMGR] Fix 64-bit bugs

This commit is contained in:
Timo Kreuzer 2023-11-26 11:57:29 +02:00
parent b386ea728f
commit a64a674980

View file

@ -75,13 +75,13 @@ AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
/*
* Enable a checkbox for each processor present in the system
*/
if (dwSystemAffinityMask & (1 << nCpu))
if (dwSystemAffinityMask & ((ULONG_PTR)1 << nCpu))
EnableWindow(GetDlgItem(hDlg, dwCpuTable[nCpu]), TRUE);
/*
* Check each checkbox that the current process
* has affinity with
*/
if (dwProcessAffinityMask & (1 << nCpu))
if (dwProcessAffinityMask & ((ULONG_PTR)1 << nCpu))
CheckDlgButton(hDlg, dwCpuTable[nCpu], BST_CHECKED);
}
@ -109,7 +109,7 @@ AffinityDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
* checkbox that the user checked.
*/
if (IsDlgButtonChecked(hDlg, dwCpuTable[nCpu]))
dwProcessAffinityMask |= (1 << nCpu);
dwProcessAffinityMask |= ((ULONG_PTR)1 << nCpu);
}
/*