From 60630f5b8405cc7858eb1220b1e9c6bcf88be9ea Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 2 Dec 2021 18:42:02 +0100 Subject: [PATCH] - do not init pointers to 0xffffffffffffffff. These will most certainly crash when used in any way. --- source/games/sw/src/sector.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/sw/src/sector.cpp b/source/games/sw/src/sector.cpp index b1fae7971..88fdbbec9 100644 --- a/source/games/sw/src/sector.cpp +++ b/source/games/sw/src/sector.cpp @@ -386,7 +386,9 @@ void SectorSetup(void) { memset(&SectorObject[ndx], -1, sizeof(SectorObject[0])); // 0 pointers - //memset(&SectorObject[ndx].sectp, nullptr, sizeof(SectorObject[0].sectp)); + memset(&SectorObject[ndx].sectp, 0, sizeof(SectorObject[0].sectp)); + memset(&SectorObject[ndx].so_actors, 0, sizeof(SectorObject[0].so_actors)); + SectorObject[ndx].match_event_actor = nullptr; SectorObject[ndx].PreMoveAnimator = nullptr; SectorObject[ndx].PostMoveAnimator = nullptr; SectorObject[ndx].Animator = nullptr;