From 28082f30f5cff4ceb3d38cbe924736bb896d7e8f Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 13 Jan 2004 06:39:50 +0000 Subject: [PATCH] support compressed wads (.wad.gz) and read the lump count correctly --- libs/util/wadfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/util/wadfile.c b/libs/util/wadfile.c index 621a487ae..5586fda5a 100644 --- a/libs/util/wadfile.c +++ b/libs/util/wadfile.c @@ -122,7 +122,7 @@ wad_open (const char *name) if (!wad) return 0; - wad->handle = Qopen (name, "rb"); + wad->handle = Qopen (name, "rbz"); if (!wad->handle) { goto error; } @@ -141,7 +141,7 @@ wad_open (const char *name) wad->header.infotableofs = LittleLong (wad->header.infotableofs); wad->header.numlumps = LittleLong (wad->header.numlumps); - wad->numlumps = wad->header.numlumps / sizeof (lumpinfo_t); + wad->numlumps = wad->header.numlumps; wad->old_numlumps = wad->lumps_size = wad->numlumps; wad->lumps = malloc (wad->lumps_size * sizeof (lumpinfo_t));