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(); - } } //---------------------------------------------------------------------------