- Fixed handling of embedded WADs.

SVN r1559 (trunk)
This commit is contained in:
Christoph Oelckers 2009-04-26 18:12:40 +00:00
parent 2e90519c13
commit 511ddb028c
3 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,7 @@
April 23, 2009 (Changes by Graf Zahl) April 25, 2009 (Changes by Graf Zahl)
- Fixed handling of embedded WADs.
April 23, 2009 (Changes by Graf Zahl)
- Added Gez's A_CheckCeiling submission. - Added Gez's A_CheckCeiling submission.
- Fixed: AM_NewResolution crashed when called from outside a level. - Fixed: AM_NewResolution crashed when called from outside a level.
- Added support for Quake PAK files. - Added support for Quake PAK files.

View file

@ -78,7 +78,7 @@ FResourceLump::~FResourceLump()
delete [] FullName; delete [] FullName;
FullName = NULL; FullName = NULL;
} }
if (Cache != NULL) if (Cache != NULL && RefCount >= 0)
{ {
delete [] Cache; delete [] Cache;
Cache = NULL; Cache = NULL;
@ -150,7 +150,7 @@ void FResourceLump::LumpNameSetup(char *iname)
void FResourceLump::CheckEmbedded() void FResourceLump::CheckEmbedded()
{ {
// Checks for embedded archives // Checks for embedded archives
const char *c = strstr(Name, ".wad"); const char *c = strstr(FullName, ".wad");
if (c && strlen(c) == 4 && !strchr(Name, '/')) if (c && strlen(c) == 4 && !strchr(Name, '/'))
{ {
// Mark all embedded WADs // Mark all embedded WADs

View file

@ -15,7 +15,7 @@ struct FResourceLump
char * FullName; // only valid for files loaded from a .zip file char * FullName; // only valid for files loaded from a .zip file
char Name[9]; char Name[9];
BYTE Flags; BYTE Flags;
BYTE RefCount; SBYTE RefCount;
char * Cache; char * Cache;
FResourceFile * Owner; FResourceFile * Owner;
int Namespace; int Namespace;