Another build fix for Qt GUI.

This commit is contained in:
harry 2023-01-15 04:38:53 -05:00
parent 2be7794ab5
commit 600588910f
1 changed files with 5 additions and 5 deletions

View File

@ -465,16 +465,16 @@ GetBaseDirectory(std::string &dir)
else
{
#ifdef WIN32
home = new char[MAX_PATH + 1];
GetModuleFileNameA(NULL, home, MAX_PATH + 1);
char *exePath = new char[MAX_PATH + 1];
GetModuleFileNameA(NULL, exePath, MAX_PATH + 1);
char *lastBS = strrchr(home,'\\');
char *lastBS = strrchr(exePath,'\\');
if(lastBS) {
*lastBS = 0;
}
dir = std::string(home);
delete[] home;
dir = std::string(exePath);
delete[] exePath;
#else
dir = "";
#endif