From f35ac75ca2db47ef759ebe4b5e57f3492f7494b5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 Dec 2018 14:01:07 +0100 Subject: [PATCH] - fixed precaching of switches. The backwards animation accessed the wrong array which in case of sequences with different length could crash --- src/p_setup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index a78c21541f..418296bbbf 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -113,7 +113,7 @@ static void AddToList(uint8_t *hitlist, FTextureID texid, int bitmask) } for (int i = 0; i < switchdef->PairDef->NumFrames; i++) { - hitlist[switchdef->frames[i].Texture.GetIndex()] |= (uint8_t)bitmask; + hitlist[switchdef->PairDef->frames[i].Texture.GetIndex()] |= (uint8_t)bitmask; } }