From 94efee74969d3a61f7bbb3384299b82aea9338b4 Mon Sep 17 00:00:00 2001 From: mkrsym1 Date: Tue, 4 Jul 2023 01:08:03 +0300 Subject: [PATCH] Don't use narrow characters with widestring functions --- injector/src/dll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/injector/src/dll.c b/injector/src/dll.c index fc3b1bb..1b69181 100644 --- a/injector/src/dll.c +++ b/injector/src/dll.c @@ -30,7 +30,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) { // Compute the working directory path wchar_t workdir[MAX_PATH]; wcscpy(workdir, targetExe); - *(wcsrchr(workdir, '\\')) = '\0'; + *(wcsrchr(workdir, L'\\')) = L'\0'; // SAFETY: verify that the injector is not inside the game directory HMODULE kernel32 = GetModuleHandleA("kernel32.dll");