- do two-step init of CVARs to ensure that flag and mask vars always find their master CVar.

This commit is contained in:
Christoph Oelckers 2022-10-24 19:26:30 +02:00
commit 2b805e196d
2 changed files with 24 additions and 11 deletions

View file

@ -66,7 +66,8 @@ FImageSource *AnmImage_TryCreate(FileReader & file, int lumpnum)
{
file.Seek(0, FileReader::SeekSet);
char check[4];
file.Read(check, 4);
auto num = file.Read(check, 4);
if (num < 4) return nullptr;
if (memcmp(check, "LPF ", 4)) return nullptr;
file.Seek(0, FileReader::SeekSet);
auto buffer = file.ReadPadded(1);