From e61e7fd00865cb708340d1fe4176d80c74cbc73d Mon Sep 17 00:00:00 2001 From: Xackery Date: Sun, 16 Jul 2017 23:05:09 -0700 Subject: [PATCH] eqemu_config is now persistent after first load. --- common/eqemu_config.cpp | 3 ++- common/eqemu_config.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common/eqemu_config.cpp b/common/eqemu_config.cpp index c8aa306f8..3516f15d1 100644 --- a/common/eqemu_config.cpp +++ b/common/eqemu_config.cpp @@ -45,9 +45,10 @@ void EQEmuConfig::parse_config() { LoginPassword = _root["server"]["world"]["loginserver"].get("password", "").asString(); } else { char str[32]; + loginlist.Clear(); do { sprintf(str, "loginserver%i", ++LoginCount); - if (_root["server"]["world"][str].get("host", "").asString() == "") { + if (!_root["server"]["world"][str].isObject()) { break; } diff --git a/common/eqemu_config.h b/common/eqemu_config.h index 97c5e4f9b..66cf962c6 100644 --- a/common/eqemu_config.h +++ b/common/eqemu_config.h @@ -146,7 +146,7 @@ class EQEmuConfig static bool LoadConfig() { if (_config != nullptr) { - delete _config; + return true; } _config = new EQEmuConfig;