mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-25 03:11:06 +01:00
engine: filesystem: accept ZIP files with zip extension, do not assert with NULL free in Zip_Close
This commit is contained in:
parent
c3513b1615
commit
e29dcb4125
@ -928,7 +928,8 @@ void Zip_Close( zip_t *zip )
|
||||
if( !zip )
|
||||
return;
|
||||
|
||||
Mem_Free( zip->files );
|
||||
if( zip->files )
|
||||
Mem_Free( zip->files );
|
||||
|
||||
FS_EnsureOpenZip( NULL );
|
||||
|
||||
@ -1209,7 +1210,7 @@ qboolean FS_AddZip_Fullpath( const char *zipfile, qboolean *already_loaded, int
|
||||
|
||||
if( already_loaded ) *already_loaded = false;
|
||||
|
||||
if( !Q_stricmp( ext, "pk3" ) )
|
||||
if( !Q_stricmp( ext, "pk3" ) || !Q_stricmp( ext, "zip" ))
|
||||
zip = FS_LoadZip( zipfile, &errorcode );
|
||||
|
||||
if( zip )
|
||||
|
Loading…
Reference in New Issue
Block a user