From 0e82d75325f8c2454d11269861c78e2825e18ae1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 30 Aug 2021 14:58:12 +0200 Subject: [PATCH] - SW: fixed recursive saving of panel sprites --- source/games/sw/src/save.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index b060c4fa0..b18997f66 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -288,19 +288,19 @@ void preSerializePanelSprites(FSerializer& arc) void postSerializePanelSprites(FSerializer& arc) { + if (arc.BeginArray("panelsprites")) + { + for(unsigned i = 0; i < pspAsArray.Size(); i++) + { + arc(nullptr, *pspAsArray[i]); + } + arc.EndArray(); + } if (arc.isWriting()) { unsigned siz = pspAsArray.Size(); arc("panelcount", siz); } - if (arc.BeginArray("panelsprites")) - { - for (auto psp : pspAsArray) - { - arc(nullptr, *psp); - } - arc.EndArray(); - } } //---------------------------------------------------------------------------