mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-22 23:45:21 +01:00
The flag MPQ_OPEN_NO_LISTFILE is now propagated by SFileOpenPatchArchive
This commit is contained in:
@@ -1081,7 +1081,6 @@ void Patch_Finalize(TMPQPatcher * pPatcher)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Public functions
|
||||
|
||||
@@ -1096,9 +1095,6 @@ bool WINAPI SFileOpenPatchArchive(
|
||||
HANDLE hPatchMpq = NULL;
|
||||
DWORD dwErrCode = ERROR_SUCCESS;
|
||||
|
||||
// Keep compiler happy
|
||||
dwFlags = dwFlags;
|
||||
|
||||
// Verify input parameters
|
||||
if(!IsValidMpqHandle(hMpq))
|
||||
dwErrCode = ERROR_INVALID_HANDLE;
|
||||
@@ -1114,7 +1110,7 @@ bool WINAPI SFileOpenPatchArchive(
|
||||
// 2) Modify or replace a file
|
||||
// 3) Add patch archive to the opened MPQ
|
||||
// 4) Read patched file
|
||||
// 5) Now what ?
|
||||
// 5) Now what?
|
||||
//
|
||||
|
||||
if(dwErrCode == ERROR_SUCCESS)
|
||||
@@ -1126,7 +1122,11 @@ bool WINAPI SFileOpenPatchArchive(
|
||||
// Open the archive like it is normal archive
|
||||
if(dwErrCode == ERROR_SUCCESS)
|
||||
{
|
||||
if(SFileOpenArchive(szPatchMpqName, 0, MPQ_OPEN_READ_ONLY | MPQ_OPEN_PATCH, &hPatchMpq))
|
||||
// These flags will be propagated to SFileOpenArchive
|
||||
dwFlags = (dwFlags & MPQ_OPEN_NO_LISTFILE) | MPQ_OPEN_READ_ONLY | MPQ_OPEN_PATCH;
|
||||
|
||||
// Open the patch as MPQ
|
||||
if(SFileOpenArchive(szPatchMpqName, 0, dwFlags, &hPatchMpq))
|
||||
{
|
||||
// Cast the archive handle to structure pointer
|
||||
haPatch = (TMPQArchive *)hPatchMpq;
|
||||
|
||||
Reference in New Issue
Block a user