Don't use narrow characters with widestring functions

This commit is contained in:
mkrsym1 2023-07-04 01:08:03 +03:00
parent 06be53ad8e
commit 94efee7496

View File

@ -30,7 +30,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
// Compute the working directory path // Compute the working directory path
wchar_t workdir[MAX_PATH]; wchar_t workdir[MAX_PATH];
wcscpy(workdir, targetExe); wcscpy(workdir, targetExe);
*(wcsrchr(workdir, '\\')) = '\0'; *(wcsrchr(workdir, L'\\')) = L'\0';
// SAFETY: verify that the injector is not inside the game directory // SAFETY: verify that the injector is not inside the game directory
HMODULE kernel32 = GetModuleHandleA("kernel32.dll"); HMODULE kernel32 = GetModuleHandleA("kernel32.dll");