소스 검색

[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.
Marc-Antoine Lortie 5 년 전
부모
커밋
6970e70dbb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      code/MDL/MDLLoader.cpp

+ 2 - 2
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.");
     }