- SW: fixed bad serialization of sector object pointers

This commit is contained in:
Christoph Oelckers 2021-04-19 23:49:10 +02:00
parent a4f5a32680
commit 729928c576

View file

@ -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;
}