mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Settings: Fix a crash if worldserver.conf DataDir setting is empty
This commit is contained in:
@@ -1105,7 +1105,7 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
///- Read the "Data" directory from the config file
|
||||
std::string dataPath = sConfigMgr->GetStringDefault("DataDir", "./");
|
||||
if (dataPath.at(dataPath.length()-1) != '/' && dataPath.at(dataPath.length()-1) != '\\')
|
||||
if (dataPath.empty() || (dataPath.back() != '/' && dataPath.back() != '\\'))
|
||||
dataPath.push_back('/');
|
||||
|
||||
#if PLATFORM == PLATFORM_UNIX || PLATFORM == PLATFORM_APPLE
|
||||
|
||||
Reference in New Issue
Block a user