From 090502b2439fe8e1d5416a5c0d577433df02825b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 25 Apr 2017 19:55:05 +0200 Subject: [PATCH] - moved the 'no player start' check to the end of G_DoLoadLevel because inside G_FinishTravel it would leave some data in undefined places that later can cause a crash. --- src/g_level.h | 2 +- src/p_udmf.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_level.h b/src/g_level.h index 6b4d1d8f2..d332a0093 100644 --- a/src/g_level.h +++ b/src/g_level.h @@ -468,7 +468,7 @@ enum void G_ChangeLevel(const char *levelname, int position, int flags, int nextSkill=-1); void G_StartTravel (); -void G_FinishTravel (); +int G_FinishTravel (); void G_DoLoadLevel (int position, bool autosave); diff --git a/src/p_udmf.cpp b/src/p_udmf.cpp index 7952d2a92..3b8c06132 100644 --- a/src/p_udmf.cpp +++ b/src/p_udmf.cpp @@ -2073,6 +2073,7 @@ public: else if (sc.Compare("sector")) { sector_t sec; + memset(&sec, 0, sizeof(sector_t)); ParseSector(&sec, ParsedSectors.Size()); ParsedSectors.Push(sec); }