From b095bc2bce9f8ea7769d8b3eabcb8174e094bb9a Mon Sep 17 00:00:00 2001 From: DavidXanatos <3890945+DavidXanatos@users.noreply.github.com> Date: Sun, 12 May 2024 21:27:17 +0200 Subject: [PATCH] fix --- Sandboxie/core/dll/guimisc.c | 5 +++-- Sandboxie/core/dll/kernel.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Sandboxie/core/dll/guimisc.c b/Sandboxie/core/dll/guimisc.c index cbed0807..7ef60407 100644 --- a/Sandboxie/core/dll/guimisc.c +++ b/Sandboxie/core/dll/guimisc.c @@ -293,8 +293,9 @@ _FX BOOLEAN Gui_InitMisc(HMODULE module) if (SbieApi_QueryConfBool(NULL, L"UseChangeSpeed", FALSE)) { P_SetTimer SetTimer = Ldr_GetProcAddrNew(DllName_user32, "SetTimer", "SetTimer"); - if (SetTimer) - SBIEDLL_HOOK(Gui_, SetTimer); + if (SetTimer) { + SBIEDLL_HOOK(Gui_, SetTimer); + } } return TRUE; diff --git a/Sandboxie/core/dll/kernel.c b/Sandboxie/core/dll/kernel.c index 40319055..76bc7fae 100644 --- a/Sandboxie/core/dll/kernel.c +++ b/Sandboxie/core/dll/kernel.c @@ -97,11 +97,13 @@ _FX BOOLEAN Kernel_Init() SBIEDLL_HOOK(Kernel_, GetTickCount); P_GetTickCount64 GetTickCount64 = Ldr_GetProcAddrNew(Dll_Kernel32, L"GetTickCount64", "GetTickCount64"); - if (GetTickCount64) + if (GetTickCount64) { SBIEDLL_HOOK(Kernel_, GetTickCount64); + } P_QueryUnbiasedInterruptTime QueryUnbiasedInterruptTime = Ldr_GetProcAddrNew(Dll_Kernel32, L"QueryUnbiasedInterruptTime", "QueryUnbiasedInterruptTime"); - if (QueryUnbiasedInterruptTime) + if (QueryUnbiasedInterruptTime) { SBIEDLL_HOOK(Kernel_, QueryUnbiasedInterruptTime); + } SBIEDLL_HOOK(Kernel_, QueryPerformanceCounter); //SBIEDLL_HOOK(Kernel_, Sleep); SBIEDLL_HOOK(Kernel_, SleepEx);