From e3b8d30716077271b57c9932ea6a8804ee563bc0 Mon Sep 17 00:00:00 2001
From: Leon Niklas Lux <leon-niklas.lux@informatik.hs-fulda.de>
Date: Mon, 3 Feb 2025 14:04:37 +0100
Subject: [PATCH] =?UTF-8?q?Truncate=20zu=20saveChanges=20hinzugef=C3=BCgt.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 liblvl/src/level.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/liblvl/src/level.cpp b/liblvl/src/level.cpp
index f74b338..1781aec 100644
--- a/liblvl/src/level.cpp
+++ b/liblvl/src/level.cpp
@@ -25,7 +25,7 @@ Level::Level(const fs::path &path)
 
 void Level::saveChanges(const fs::path& path) const
 {
-    HighFive::File file(path.c_str(), HighFive::File::Create);
+    HighFive::File file(path.c_str(), HighFive::File::Create | HighFive::File::Truncate);
     m_Spritesheet.toHDF5(file);
     saveEnemies(file);
     saveRooms(file);
-- 
GitLab