changeset 15007:fa4ce54f12c3 draft

(svn r19619) -Fix (r19618): [desync debug] inserting the "join" pause could cause a crash as some command data was not properly initialised
author rubidium <rubidium@openttd.org>
date Tue, 13 Apr 2010 18:40:47 +0000
parents 7ebbd7748e83
children ee359ca920a8
files src/network/network.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -1147,7 +1147,7 @@
 				int ret = sscanf(p + 6, "%x; %x", &next_date, &next_date_fract);
 				assert(ret == 2);
 				DEBUG(net, 0, "injecting pause for join at %08x:%02x; please join when paused", next_date, next_date_fract);
-				cp = MallocT<CommandPacket>(1);
+				cp = CallocT<CommandPacket>(1);
 				cp->company = COMPANY_SPECTATOR;
 				cp->cmd = CMD_PAUSE;
 				cp->p1 = PM_PAUSED_NORMAL;