ref: 8f00200a9795697a7a432ab93ff059281c6ed87d
parent: 1e7908feb322f4ad8a88008964f1558861348ae6
author: James Haley <haleyjd@hotmail.com>
date: Sun Jul 15 05:35:45 EDT 2012
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
--- a/src/hexen/d_net.c
+++ b/src/hexen/d_net.c
@@ -155,6 +155,11 @@
{
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