Skip to content

Commit

Permalink
check config already defined (#4767)
Browse files Browse the repository at this point in the history
  • Loading branch information
rookgaard authored Aug 14, 2024
1 parent 973855c commit c0265be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/configmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ bool ConfigManager::load()

luaL_openlibs(L);

string[CONFIG_FILE] = "config.lua";
if (string[CONFIG_FILE].empty()) {
string[CONFIG_FILE] = "config.lua";
}

if (luaL_dofile(L, string[CONFIG_FILE].data())) {
std::cout << "[Error - ConfigManager::load] " << lua_tostring(L, -1) << std::endl;
lua_close(L);
Expand Down

0 comments on commit c0265be

Please sign in to comment.