From 6970e70dbb48e82f0a0c4a1569706ae518d95ae0 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lortie Date: Fri, 17 Jan 2020 08:27:52 -0500 Subject: [PATCH] [MDL] Updated header to use when checking file size. (Redone) This is needed since it's possible to have an MDL sequence group file that has a size less than the Quake 1 MDL header. --- code/MDL/MDLLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/MDL/MDLLoader.cpp b/code/MDL/MDLLoader.cpp index 57a6bda95..eb629d35a 100644 --- a/code/MDL/MDLLoader.cpp +++ b/code/MDL/MDLLoader.cpp @@ -179,9 +179,9 @@ void MDLImporter::InternReadFile( const std::string& pFile, } // This should work for all other types of MDL files, too ... - // the quake header is one of the smallest, afaik + // the HL1 sequence group header is one of the smallest, afaik iFileSize = (unsigned int)file->FileSize(); - if( iFileSize < sizeof(MDL::Header)) { + if( iFileSize < sizeof(MDL::HalfLife::SequenceHeader_HL1)) { throw DeadlyImportError( "MDL File is too small."); }