From 18253df8688f4b3728cee492a79aef5fa7e5c946 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 3ce22305bc..bfd4fc430a 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -2976,7 +2976,7 @@ void MapLoader::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; } }