diff --git a/src/resourcefiles/file_directory.cpp b/src/resourcefiles/file_directory.cpp index 2be8da1b14..8b85425f16 100644 --- a/src/resourcefiles/file_directory.cpp +++ b/src/resourcefiles/file_directory.cpp @@ -341,7 +341,7 @@ int FDirectoryLump::FillCache() FileReader *reader = NewReader(); if (reader == NULL) { - memset(Cache, 0, sizeof(Cache)); + memset(Cache, 0, LumpSize); return 0; } reader->Read(Cache, LumpSize);