summaryrefslogtreecommitdiffstats
path: root/src/IniFile.cpp
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-05-18 17:04:27 +0200
committertycho <work.tycho@gmail.com>2015-05-18 18:26:12 +0200
commit2e98bfc4e98c1cb0730514628d501c2ca0326c4e (patch)
treef1f428fa8c201e19d6ac3e60e35a5693fc711696 /src/IniFile.cpp
parentFix max slots logic to only override if acctually present. (diff)
downloadcuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar.gz
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar.bz2
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar.lz
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar.xz
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.tar.zst
cuberite-2e98bfc4e98c1cb0730514628d501c2ca0326c4e.zip
Diffstat (limited to 'src/IniFile.cpp')
-rw-r--r--src/IniFile.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/IniFile.cpp b/src/IniFile.cpp
index 8dab87d15..cd98cce57 100644
--- a/src/IniFile.cpp
+++ b/src/IniFile.cpp
@@ -931,7 +931,18 @@ AStringVector ReadUpgradeIniPorts(
)
{
// Read the regular value, but don't use the default (in order to detect missing value for upgrade):
- AStringVector Ports = StringSplitAndTrim(a_Settings.GetValue(a_KeyName, a_PortsValueName), ";,");
+
+ AStringVector Ports;
+
+ for (auto pair : a_Settings.GetValues(a_KeyName))
+ {
+ if (pair.first != a_PortsValueName)
+ {
+ continue;
+ }
+ AStringVector temp = StringSplitAndTrim(pair.second, ";,");
+ Ports.insert(Ports.end(), temp.begin(), temp.end());
+ }
if (Ports.empty())
{