mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-31 19:46:33 +01:00
+ Bug fixes in SFileGetFileInfo, SAttrFileSaveToMpq, SListFileSaveToMpq
+ FileStream now handles files over 2GB properly + Test under Linux
This commit is contained in:
@@ -382,19 +382,13 @@ int SListFileSaveToMpq(TMPQArchive * ha)
|
||||
|
||||
// At this point, we expect to have at least one reserved entry in the file table
|
||||
assert(ha->dwReservedFiles >= 1);
|
||||
ha->dwReservedFiles--;
|
||||
|
||||
// Create the raw data that is to be written to (listfile)
|
||||
// Note: Creating the raw data before the (listfile) has been created in the MPQ
|
||||
// causes that the name of the listfile will not be included in the listfile itself.
|
||||
// That is OK, because (listfile) in Blizzard MPQs does not contain it either.
|
||||
pbListFile = CreateListFile(ha, &cbListFile);
|
||||
|
||||
// Now we decrement the number of reserved files.
|
||||
// This frees one slot in the file table, so the subsequent file create operation should succeed
|
||||
// This must happen even if the listfile cannot be created
|
||||
ha->dwReservedFiles--;
|
||||
|
||||
// If the listfile create succeeded, we write it to the MPQ
|
||||
if(pbListFile != NULL)
|
||||
{
|
||||
// We expect it to be nonzero size
|
||||
|
||||
Reference in New Issue
Block a user