summaryrefslogtreecommitdiff
path: root/source/sv_game.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-09-22 18:44:50 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-09-22 18:44:50 +0000
commit8cb1f3121ea0120217d28d48221e9bf6529d073c (patch)
tree97584c3623890d16cd169f41fa04450f36ba97b3 /source/sv_game.c
parent36432ed920ff260f4904aab1fa816b2f34c592b4 (diff)
Fixed nasty bug instroduced by packetized sound message handling due to
uninitialized memory access. Server crashed randomly when someone disconnected. Added z_perturb cvar to help debug and prevent such problems.
Diffstat (limited to 'source/sv_game.c')
-rw-r--r--source/sv_game.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/sv_game.c b/source/sv_game.c
index c7b4c30..d2c4eba 100644
--- a/source/sv_game.c
+++ b/source/sv_game.c
@@ -596,6 +596,7 @@ static void PF_StartSound( edict_t *edict, int channel,
msg = LIST_FIRST( sound_packet_t, &client->freemsg, entry );
+ msg->cursize = 0; // !!! make sure this does not get Z_Free'ed
msg->flags = flags;
msg->index = soundindex;
msg->volume = volume * 255;