diff --git a/src/resourcefiles/file_directory.cpp b/src/resourcefiles/file_directory.cpp index 2be8da1b1..8b85425f1 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);