aboutsummaryrefslogtreecommitdiff
path: root/src/serverenvironment.cpp
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-02-10 19:50:36 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-02-10 19:50:36 +0100
commit1fbbb768252f872dfa961d3a73460d996164d527 (patch)
treee9faf93dbd894b253ac3d1f0895b7468e8fee50d /src/serverenvironment.cpp
parent74f5f033e04c0d8694815fedb795838d4926cbc9 (diff)
parent9736b9cea5f841bb0e9bb2c9c05c3b2560327064 (diff)
downloaddragonfireclient-1fbbb768252f872dfa961d3a73460d996164d527.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/serverenvironment.cpp')
-rw-r--r--src/serverenvironment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/serverenvironment.cpp b/src/serverenvironment.cpp
index 56dbb0632..3d9ba132b 100644
--- a/src/serverenvironment.cpp
+++ b/src/serverenvironment.cpp
@@ -632,7 +632,7 @@ void ServerEnvironment::saveMeta()
// Open file and serialize
std::ostringstream ss(std::ios_base::binary);
- Settings args;
+ Settings args("EnvArgsEnd");
args.setU64("game_time", m_game_time);
args.setU64("time_of_day", getTimeOfDay());
args.setU64("last_clear_objects_time", m_last_clear_objects_time);
@@ -641,7 +641,6 @@ void ServerEnvironment::saveMeta()
m_lbm_mgr.createIntroductionTimesString());
args.setU64("day_count", m_day_count);
args.writeLines(ss);
- ss<<"EnvArgsEnd\n";
if(!fs::safeWriteToFile(path, ss.str()))
{
@@ -676,9 +675,9 @@ void ServerEnvironment::loadMeta()
throw SerializationError("Couldn't load env meta");
}
- Settings args;
+ Settings args("EnvArgsEnd");
- if (!args.parseConfigLines(is, "EnvArgsEnd")) {
+ if (!args.parseConfigLines(is)) {
throw SerializationError("ServerEnvironment::loadMeta(): "
"EnvArgsEnd not found!");
}