This commit is contained in:
parent
5db7a74047
commit
50ee204b02
3 changed files with 4 additions and 5 deletions
|
|
@ -105,7 +105,9 @@ namespace Crafter {
|
|||
std::filesystem::path GetPath() {
|
||||
char path[MAX_PATH];
|
||||
DWORD length = GetModuleFileNameA(NULL, path, MAX_PATH);
|
||||
std::cout << lenght << std::endl;
|
||||
if (length == 0) {
|
||||
std::cout << "failed" << std::endl;
|
||||
throw std::runtime_error("Failed to get executable path");
|
||||
}
|
||||
path[length] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue