From a64a6749807fc379bd36211b52287ee82cc230b0 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 26 Nov 2023 11:57:29 +0200 Subject: [PATCH] [TASKMGR] Fix 64-bit bugs --- base/applications/taskmgr/affinity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base/applications/taskmgr/affinity.c b/base/applications/taskmgr/affinity.c index 6470caa9526..dbf599dd01a 100644 --- a/base/applications/taskmgr/affinity.c +++ b/base/applications/taskmgr/affinity.c @@ -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); } /*