mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-17 21:48:19 +01:00
+ Fixed crash when adding file after an empty archive has been flushed
This commit is contained in:
@@ -434,6 +434,11 @@ int SFileAddFile_Init(
|
||||
// If the caller didn't set MPQ_FILE_REPLACEEXISTING, fail it
|
||||
if((dwFlags & MPQ_FILE_REPLACEEXISTING) == 0)
|
||||
nError = ERROR_ALREADY_EXISTS;
|
||||
|
||||
// When replacing an existing file,
|
||||
// we still need to invalidate the (attributes) file
|
||||
if(nError == ERROR_SUCCESS)
|
||||
InvalidateInternalFiles(ha);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user