From 759d0edd812ec07b35bb1f2310cd685f59cb4317 Mon Sep 17 00:00:00 2001 From: "Dax T. Games" Date: Mon, 25 Sep 2023 12:02:57 -0400 Subject: [PATCH] fix --- launcher/src/CmderLauncher.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/launcher/src/CmderLauncher.cpp b/launcher/src/CmderLauncher.cpp index 95b7432..73e006a 100644 --- a/launcher/src/CmderLauncher.cpp +++ b/launcher/src/CmderLauncher.cpp @@ -701,6 +701,11 @@ cmderOptions GetOption() int argCount; wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; + wchar_t exeDir[MAX_PATH] = { 0 }; + + GetModuleFileName(NULL, exeDir, sizeof(exeDir)); + PathRemoveFileSpec(exeDir); + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); szArgList = CommandLineToArgvW(GetCommandLine(), &argCount); @@ -863,7 +868,12 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, cmderOptions cmderOptions = GetOption(); wchar_t windowsTerminalDir[MAX_PATH] = { 0 }; - PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); + wchar_t exeDir[MAX_PATH] = { 0 }; + + GetModuleFileName(NULL, exeDir, sizeof(exeDir)); + PathRemoveFileSpec(exeDir); + + PathCombine(windowsTerminalDir, exeDir, L"vendor\\windows-terminal"); if (cmderOptions.registerApp == true) {