From 65f567d81750cd94fc4c60f6276e381e2725bce6 Mon Sep 17 00:00:00 2001 From: athrxx Date: Sun, 28 Feb 2021 00:00:34 +0100 Subject: [PATCH] SCUMM: (FM-Towns) - array declaration cleanup _cyclRects can have no more than 10 entries, but was declared as [16]. Someone put a TODO about it in saveload.cpp, so why not fix it... --- engines/scumm/saveload.cpp | 1 - engines/scumm/scumm.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index 068bf8a6973..a05e6326805 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -1318,7 +1318,6 @@ void ScummEngine::saveLoadWithSerializer(Common::Serializer &s) { if (hasTownsData) { s.syncBytes(_textPalette, 48); - // TODO: This seems wrong, there are 16 _cyclRects s.syncArray(_cyclRects, 10, syncWithSerializer, VER(82)); if (s.getVersion() >= VER(82)) syncWithSerializer(s, _curStringRect); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index e790841f3a4..649d327f540 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1365,7 +1365,7 @@ protected: void towns_waitForScroll(int waitForDirection, int threshold = 0); void towns_updateGfx(); - Common::Rect _cyclRects[16]; + Common::Rect _cyclRects[10]; int _numCyclRects; int _scrollRequest; int _scrollDeltaAdjust;