From f18f3b4a3917c8d74186f535a30b4f9dffad7afb Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 14 Jan 2014 12:07:53 +0100 Subject: + Fixed cases with invalid block table size --- test/Test.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/Test.cpp') diff --git a/test/Test.cpp b/test/Test.cpp index a82a6e1..e0ad262 100644 --- a/test/Test.cpp +++ b/test/Test.cpp @@ -2269,6 +2269,12 @@ static int TestOpenArchive(const char * szPlainName, const char * szListFile = N return nError; } +static int TestOpenArchive_WillFail(const char * szPlainName, const char * szListFile = NULL) +{ + TestOpenArchive(szPlainName, szListFile); + return ERROR_SUCCESS; +} + static int TestOpenArchive_Corrupt(const char * szPlainName) { TLogHelper Logger("OpenCorruptMpqTest", szPlainName); @@ -3511,7 +3517,7 @@ int main(int argc, char * argv[]) if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2011_v4_InvalidHetEntryCount.MPQ"); - // Open an truncated archive + // Open a truncated archive if(nError == ERROR_SUCCESS) nError = TestOpenArchive("MPQ_2002_v1_BlockTableCut.MPQ"); @@ -3561,7 +3567,7 @@ int main(int argc, char * argv[]) // Open the multi-file archive with wrong prefix to see how StormLib deals with it if(nError == ERROR_SUCCESS) - nError = TestOpenArchive("flat-file://streaming/model.MPQ.0"); + nError = TestOpenArchive_WillFail("flat-file://streaming/model.MPQ.0"); // Open an archive that is merged with multiple files if(nError == ERROR_SUCCESS) -- cgit v1.2.3