From 22a81d7c76e5d4618ae1102a3a7003dcf3b577b0 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Thu, 13 Apr 2006 18:36:11 +0000 Subject: [PATCH] Prevent non-standard wads (most notably GP32 wads) that should not run from ever making it into game (avoid freezes, data aborts, memory corruption, etc..) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9647 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/v_video.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/plugins/doom/v_video.c b/apps/plugins/doom/v_video.c index da53311e76..95c396ecf4 100644 --- a/apps/plugins/doom/v_video.c +++ b/apps/plugins/doom/v_video.c @@ -418,15 +418,14 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, x -= SHORT(patch->leftoffset); // // CPhipps - auto-no-stretch if not high-res -// if (flags & VPT_STRETCH) -// if ((SCREENWIDTH==320) && (SCREENHEIGHT==200)) -// flags &= ~VPT_STRETCH; + if (flags & VPT_STRETCH) + if ((SCREENWIDTH==320) && (SCREENHEIGHT==200)) + flags &= ~VPT_STRETCH; // CPhipps - null translation pointer => no translation if (!trans) flags &= ~VPT_TRANS; -#ifdef RANGECHECK if (x<0 ||x+SHORT(patch->width) > ((flags & VPT_STRETCH) ? 320 : SCREENWIDTH) || y<0 @@ -434,7 +433,6 @@ void V_DrawMemPatch(int x, int y, int scrn, const patch_t *patch, // killough 1/19/98: improved error message: I_Error("V_DrawMemPatch: Patch (%d,%d)-(%d,%d) exceeds LFB Bad V_DrawMemPatch (flags=%u)", x, y, x+SHORT(patch->width), y+SHORT(patch->height), flags); -#endif if (!(flags & VPT_STRETCH)) { unsigned int col;