summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
authorJames Haley2012-07-15 09:35:45 +0000
committerJames Haley2012-07-15 09:35:45 +0000
commit8f00200a9795697a7a432ab93ff059281c6ed87d (patch)
tree5cf4782ae31fb9990cc8fc164cc2a620f69151e8 /src/hexen
parent1e7908feb322f4ad8a88008964f1558861348ae6 (diff)
downloadchocolate-doom-8f00200a9795697a7a432ab93ff059281c6ed87d.tar.gz
chocolate-doom-8f00200a9795697a7a432ab93ff059281c6ed87d.tar.bz2
chocolate-doom-8f00200a9795697a7a432ab93ff059281c6ed87d.zip
Fix problem with uninitialized values in the settings structure which
surfaces during debug builds under MSVC. ATTN fraggle: review other games' code for similar problems. Subversion-branch: /branches/v2-branch Subversion-revision: 2515
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/d_net.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hexen/d_net.c b/src/hexen/d_net.c
index 9b26af31..0fe5ed1e 100644
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -155,6 +155,11 @@ static void SaveGameSettings(net_gamesettings_t *settings,
{
int i;
+ // jhaley 20120715: Some parts of the structure are being left
+ // uninitialized. If -class is not used on the command line, this
+ // can lead to a crash in SB_Init due to player class == 0xCCCCCCCC.
+ memset(settings, 0, sizeof(*settings));
+
// Fill in game settings structure with appropriate parameters
// for the new game