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
This commit is contained in:
Karl Kurbjun 2006-04-13 18:36:11 +00:00
parent 0744e760cb
commit 22a81d7c76

View file

@ -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;