From 3c282b435c7d0508d72104d26a0c9171f7feea71 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Tue, 26 Mar 2024 20:41:53 +0700 Subject: [PATCH] Draw_ValidateCustomLogo: Fixed incorrect offset to palette size --- rehlds/engine/decals.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/decals.cpp b/rehlds/engine/decals.cpp index 1705b7f..19959d3 100644 --- a/rehlds/engine/decals.cpp +++ b/rehlds/engine/decals.cpp @@ -756,8 +756,8 @@ qboolean Draw_ValidateCustomLogo(cachewad_t *wad, unsigned char *data, lumpinfo_ Con_Printf("%s: Bad cached wad size %i/%i on %s\n", __func__, size + sizeof(miptex_t), lump->size + wad->cacheExtra, wad->name); } - paloffset = size + sizeof(lumpinfo_t) + sizeof(miptex_t); - palettesize = *(u_short *)(data + paloffset); // Get palette size + paloffset = size + sizeof(miptex_t); + palettesize = *(u_short *)(data + wad->cacheExtra + paloffset); // Get palette size for (i = 0; i < 3; i++) {