From fa53fcd0853f5f581e7b44f484bef45d9af2d646 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 27 Aug 2022 00:02:57 +0200 Subject: [PATCH] - undid the fix that allocated one byte too many for loading a complete file into an FString. Without this padding byte the voxel loader does not work. --- source/common/filesystem/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/filesystem/filesystem.cpp b/source/common/filesystem/filesystem.cpp index 50f3fcdbb..69f887860 100644 --- a/source/common/filesystem/filesystem.cpp +++ b/source/common/filesystem/filesystem.cpp @@ -1612,7 +1612,7 @@ FString::FString(ELumpNum lumpnum) { auto lumpr = fileSystem.OpenFileReader((int)lumpnum); auto size = lumpr.GetLength(); - AllocBuffer(size); + AllocBuffer(size + 1); auto numread = lumpr.Read(&Chars[0], size); Chars[size] = '\0';