From 3643858d00d26165404837a1f0f7640a84873c30 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Sun, 21 Apr 2024 18:22:59 +0200 Subject: Fixed reading big files from non-corrupt MPQs --- test/StormTest.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index e8c9bd5..540557a 100755 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -3787,16 +3787,13 @@ static DWORD TestReplaceFile(LPCTSTR szMpqPlainName, LPCTSTR szFilePlainName, LP static void Test_PlayingSpace() { - HANDLE hFile = NULL; + SFILE_FIND_DATA sf; HANDLE hMpq = NULL; - if(SFileOpenArchive(_T("(4)Duskwood.w3m"), 0, 0, &hMpq)) + if(SFileOpenArchive(_T("e:\\poc11"), 0, 0, &hMpq)) { - if(SFileOpenFileEx(hMpq, "war3map.j", 0, &hFile)) - { - SFileSetFileLocale(hFile, 1033); - SFileCloseFile(hFile); - } + SFileFindFirstFile(hMpq, "*", &sf, NULL); + SFileAddWave(hMpq, _T("e:\\Ladik\\Incoming\\poc11"), "poc11", MPQ_FILE_FIX_KEY, 1); SFileCloseArchive(hMpq); } } -- cgit v1.2.3