diff --git a/src/g_demo.c b/src/g_demo.c index cf64499e0..ba4ba9e02 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -2361,6 +2361,7 @@ static void G_SkipDemoExtraFiles(UINT8 **pp) { SKIPSTRING((*pp));// file name (*pp) += 16;// md5 + (*pp) += 1; // compatmode } } diff --git a/src/r_textures.c b/src/r_textures.c index d7e6b77bd..c8a32f8e9 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -297,11 +297,12 @@ static boolean R_CheckTextureLumpLength(texture_t *texture, size_t patch) void R_DoPaletteRemapPatch(softwarepatch_t *patch, size_t size) { - (void)size; - UINT32 *columns = patch->columnofs; + if (!Picture_CheckIfDoomPatch(patch, size)) + return; + for (INT16 i = 0; i < patch->width; i++) { - UINT8 *p = (UINT8 *)patch + columns[i]; + UINT8 *p = (UINT8 *)patch + patch->columnofs[i]; while (*p++ != 0xff) // topdelta { int length = *p++; diff --git a/src/w_wad.c b/src/w_wad.c index 1d374c611..f7e476882 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -1839,7 +1839,7 @@ void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag) // we already know this is a patch, do palette remapping here if (wadfiles[wad]->compatmode) - R_DoPaletteRemapPatch(ptr, wadfiles[wad]->lumpinfo[lump].size); + R_DoPaletteRemapPatch(ptr, len); dest = Z_Calloc(sizeof(patch_t), tag, &lumpcache[lump]); Patch_Create(ptr, len, dest);