From 208626a9a23f3476b69edb87594a93b502ad9926 Mon Sep 17 00:00:00 2001 From: TimeServ Date: Wed, 21 Dec 2005 06:50:57 +0000 Subject: [PATCH] fix to vfs seek logic git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1730 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/wad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/client/wad.c b/engine/client/wad.c index f5866074d..9dda4ee15 100644 --- a/engine/client/wad.c +++ b/engine/client/wad.c @@ -307,7 +307,7 @@ void W_LoadTextureWadFile (char *filename, int complain) if (numlumps < 1 || numlumps > TEXWAD_MAXIMAGES) {Con_Printf ("W_LoadTextureWadFile: invalid number of lumps (%i)\n", numlumps);return;} infotableofs = LittleLong(header.infotableofs); - if (VFS_SEEK(file, infotableofs)) + if (!VFS_SEEK(file, infotableofs)) {Con_Printf ("W_LoadTextureWadFile: unable to seek to lump table");return;} if (!((lumps = Hunk_TempAlloc(sizeof(lumpinfo_t)*numlumps)))) {Con_Printf ("W_LoadTextureWadFile: unable to allocate temporary memory for lump table");return;} @@ -437,7 +437,7 @@ qbyte *W_GetTexture(char *name, int *width, int *height, qboolean *usesalpha)//r if (!strcmp(texname, texwadlump[i].name)) // found it { file = texwadlump[i].file; - if (VFS_SEEK(file, texwadlump[i].position)) + if (!VFS_SEEK(file, texwadlump[i].position)) {Con_Printf("W_GetTexture: corrupt WAD3 file");return NULL;} tex = BZ_Malloc(texwadlump[i].size); //temp buffer for disk info (was hunk_tempalloc, but that wiped loading maps and the like