From 471e11f4b55213ae0e3c75263ce3e9859ffacb9b Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 18 May 2025 15:50:34 +0100 Subject: [PATCH] HWR_CreateBlendedTexture: Do not operate on colorbrightnesses outside of TC_RAINBOW This array is uninitialised when that is not being operated upon, and the valid context was only one bracket away, so shift it over --- src/hardware/hw_md2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 7a49edcb8..977db93b6 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -826,10 +826,9 @@ static void HWR_CreateBlendedTexture(patch_t *gpatch, patch_t *blendgpatch, GLMi } } } - } - if (translen > 0) colorbrightnesses[translen] = colorbrightnesses[translen-1]; + } if (skinnum == TC_BLINK) blendcolor = V_GetColor(skincolors[color].ramp[3]);