From 7ff55502f04f9f75b01879ea04518c14d4706046 Mon Sep 17 00:00:00 2001 From: yexo Date: Thu, 25 Feb 2010 20:06:11 +0000 Subject: (svn r19256) -Codechange: use a constructor/destructor for GRFConfig to make sure all members are properly initialized --- src/network/core/udp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/network/core') diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index 4bf0c1e30..e56c839d0 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -238,7 +238,7 @@ void NetworkUDPSocketHandler::Recv_NetworkGameInfo(Packet *p, NetworkGameInfo *i if (num_grfs > NETWORK_MAX_GRF_COUNT) return; for (i = 0; i < num_grfs; i++) { - GRFConfig *c = CallocT(1); + GRFConfig *c = new GRFConfig(); this->Recv_GRFIdentifier(p, &c->ident); this->HandleIncomingNetworkGameInfoGRFConfig(c); -- cgit v1.2.3-70-g09d2