From 89a25ad37e5475b3ece839ebb6975004a3426142 Mon Sep 17 00:00:00 2001 From: love-code-yeyixiao <188240888@qq.com> Date: Sun, 23 Jun 2024 13:53:00 +0800 Subject: [PATCH] fix --- Sandboxie/core/dll/kernel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sandboxie/core/dll/kernel.c b/Sandboxie/core/dll/kernel.c index 2b017861..e744c265 100644 --- a/Sandboxie/core/dll/kernel.c +++ b/Sandboxie/core/dll/kernel.c @@ -398,7 +398,7 @@ _FX BOOL Kernel_QueryPerformanceCounter(LARGE_INTEGER* lpPerformanceCount) } _FX LANGID GetUserDefaultUILanguage() { - return SbieApi_QueryConfNumber(NULL, L"FalseLCID", 1033); + return (LANGID)SbieApi_QueryConfNumber(NULL, L"FalseLCID", 1033); } typedef int (*LCIDToLocaleName)( LCID Locale, @@ -469,10 +469,11 @@ char* itoa(int num, char* str, int radix) return str; } +#include const wchar_t* GetWC(const char* c) { const size_t cSize = strlen(c) + 1; - wchar_t* wc = new wchar_t[cSize]; + wchar_t* wc = malloc(sizeof(wchar_tŁ©* cSize)); mbstowcs(wc, c, cSize); return wc;