diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 8e8b3096..e6cbf5c4 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -252,11 +252,10 @@ namespace Components Utils::IO::WriteFile(Utils::String::VA("raw/%s.ents", name.data()), asset.mapEnts->entityString, true); } - static std::string mapEntities; FileSystem::File ents(name + ".ents"); if (ents.exists()) { - mapEntities = ents.getBuffer(); + static const auto mapEntities = ents.getBuffer(); asset.mapEnts->entityString = mapEntities.data(); asset.mapEnts->numEntityChars = mapEntities.size() + 1; }