From 729928c576b0335eeae8a0d298bd8fa8cc31ea14 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 19 Apr 2021 23:49:10 +0200 Subject: [PATCH] - SW: fixed bad serialization of sector object pointers --- source/games/sw/src/save.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/sw/src/save.cpp b/source/games/sw/src/save.cpp index 420f5f1c5..e71037235 100644 --- a/source/games/sw/src/save.cpp +++ b/source/games/sw/src/save.cpp @@ -631,7 +631,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, SECTOR_OBJECTp& w, { int ndx = w ? int(w - SectorObject) : -1; arc(keyname, ndx); - w = ndx == -1 ? nullptr : SectorObject; + if (arc.isReading() )w = ndx == -1 ? nullptr : SectorObject + ndx; return arc; }