From 3a3b273f06ec8870731b0387ce201d469b369439 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Fri, 22 May 2026 10:21:51 -0400 Subject: [PATCH] Explicitly use ANSI versions of Windows functions, due to changes in Qt6 Unicode behavior. (#1727) --- common/kernel/command.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/kernel/command.cc b/common/kernel/command.cc index 17d1c818..23c7395f 100644 --- a/common/kernel/command.cc +++ b/common/kernel/command.cc @@ -138,10 +138,10 @@ std::string proc_self_dirname() WCHAR longpath[MAX_PATH + 1]; TCHAR shortpath[MAX_PATH + 1]; #endif - if (!GetModuleFileName(0, longpath, MAX_PATH + 1)) - log_error("GetModuleFileName() failed.\n"); - if (!GetShortPathName(longpath, shortpath, MAX_PATH + 1)) - log_error("GetShortPathName() failed.\n"); + if (!GetModuleFileNameA(0, longpath, MAX_PATH + 1)) + log_error("GetModuleFileNameA() failed.\n"); + if (!GetShortPathNameA(longpath, shortpath, MAX_PATH + 1)) + log_error("GetShortPathNameA() failed.\n"); while (shortpath[i] != 0) i++; while (i > 0 && shortpath[i - 1] != '/' && shortpath[i - 1] != '\\')