From 866269d740b32cf209e5188c5269c4118f8be07b Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Sun, 6 Dec 2020 11:28:10 +0100 Subject: * Better checks for MPQ header v 4.0 --- test/StormTest.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test/StormTest.cpp') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 3d92ae6..497ecee 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -332,6 +332,8 @@ static bool IsMpqExtension(LPCTSTR szFileName) return true; if(!_tcsicmp(szExtension, _T(".SC2Map"))) return true; + if(!_tcsicmp(szExtension, _T(".SC2Mod"))) + return true; if(!_tcsicmp(szExtension, _T(".0"))) // .MPQ.0 return true; // if(!_tcsicmp(szExtension, ".link")) @@ -3111,6 +3113,12 @@ static int ForEachFile_OpenArchive(LPCTSTR szFullPath) nError = SearchArchive(&Logger, hMpq, 0, &dwFileCount); SFileCloseArchive(hMpq); } + + // Show warning if no files found + if(dwFileCount == 0) + { + Logger.PrintMessage("Warning: no files in the archive"); + } } // Correct some errors @@ -4237,10 +4245,10 @@ int _tmain(int argc, TCHAR * argv[]) // Tests on a local listfile // - if(dwErrCode == ERROR_SUCCESS) - { - dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt")); - } + //if(dwErrCode == ERROR_SUCCESS) + //{ + // dwErrCode = TestOnLocalListFile(_T("ListFile_Blizzard.txt")); + //} // // Open all files from the command line -- cgit v1.2.3