From c2ff8c78dd98833363e401a9d4334b8fb4684a68 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Wed, 15 Apr 2009 23:33:36 +0000 Subject: [PATCH] - Fixed memory leak from leftover code for 7z loading and added the LUMPF_ZIPFILE flag to their contents so they have the same semantics as zips. SVN r1546 (trunk) --- docs/rh-log.txt | 7 ++++++- src/w_wad.cpp | 9 +-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 390e2104d..26267e18b 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ -April 14, 2009 +April 15, 2009 +- Fixed memory leak from leftover code for 7z loading and added the + LUMPF_ZIPFILE flag to their contents so they have the same semantics + as zips. + +April 14, 2009 - Added support for 7z archives. April 13, 2009 (Changes by Graf Zahl) diff --git a/src/w_wad.cpp b/src/w_wad.cpp index 12d2b651a..33a9b8a35 100644 --- a/src/w_wad.cpp +++ b/src/w_wad.cpp @@ -815,7 +815,7 @@ void FWadCollection::AddFile (const char *filename, const char *data, int length lump_p->ZipNameSetup(name); lump_p->size = file->Size; lump_p->wadnum = (WORD)Wads.Size(); - lump_p->flags = LUMPF_7ZFILE; + lump_p->flags = LUMPF_7ZFILE | LUMPF_ZIPFILE; lump_p->position = i; lump_p->compressedsize = -1; lump_p++; @@ -2063,13 +2063,6 @@ FWadLump FWadCollection::OpenLumpNum (int lump) SetLumpAddress(l); } - if (l->flags & LUMPF_7ZFILE) - { - // An entry in a .7z file - char *buffer = new char[l->size + 1]; // the last byte is used as a reference counter - - } - if (wad != NULL) { wad->Seek (l->position, SEEK_SET);