From fb274f55d515bc710eedaeb3fbb5b25a3163d32b Mon Sep 17 00:00:00 2001 From: Duncan Date: Fri, 22 Jan 2021 22:45:00 +0000 Subject: [PATCH] Fix #13905: Fix walking off end of array when saving (#13913) Mistake made in refactor --- src/openrct2/rct2/S6Exporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/rct2/S6Exporter.cpp b/src/openrct2/rct2/S6Exporter.cpp index e75fb3963a..04587f41d4 100644 --- a/src/openrct2/rct2/S6Exporter.cpp +++ b/src/openrct2/rct2/S6Exporter.cpp @@ -974,7 +974,7 @@ void S6Exporter::RebuildEntityLinks() } else { - _s6.sprite_lists_head[EnumValue(list)] = entity.unknown.sprite_index; + _s6.sprite_lists_head[EnumValue(list) >> 1] = entity.unknown.sprite_index; } _s6.sprites[entity.unknown.sprite_index].unknown.next = SPRITE_INDEX_NULL; previous = entity.unknown.sprite_index;