From ac05f0a6b2d0e2c81c6b91ebe2853be11750cbdd Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 30 Jan 2021 15:09:35 +0200 Subject: [PATCH] - added initialization of linked sectors Resizing of linked sectors arrays during serialization could lead to processing of pointers to junk data https://forum.zdoom.org/viewtopic.php?t=71252 --- src/gamedata/r_defs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gamedata/r_defs.h b/src/gamedata/r_defs.h index 4c95a0424..6cb8f9e77 100644 --- a/src/gamedata/r_defs.h +++ b/src/gamedata/r_defs.h @@ -522,6 +522,12 @@ struct FLinkedSector { sector_t *Sector; int Type; + + FLinkedSector(sector_t *sector = nullptr, int type = 0) + : Sector(sector) + , Type(type) + { + } };