- fixed deserialization of level.Scrolls.

This commit is contained in:
Christoph Oelckers 2016-09-22 11:22:15 +02:00
parent f0e8e860f1
commit e01965b747

View file

@ -288,12 +288,13 @@ FSerializer &Serialize(FSerializer &arc, const char *key, sector_t &p, sector_t
("scrolls", scroll, nul)
.EndObject();
if (!scroll.isZero())
if (arc.isReading() && !scroll.isZero())
{
if (level.Scrolls.Size() == 0)
{
level.Scrolls.Resize(numsectors);
memset(&level.Scrolls[0], 0, sizeof(level.Scrolls[0])*level.Scrolls.Size());
level.Scrolls[p.sectornum] = scroll;
}
}
}