zero out host memory on creation

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6728 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2011-12-08 14:47:20 +00:00
parent 578ec59695
commit 3746c0a430
+1
View File
@@ -38,6 +38,7 @@ enet_host_create (const ENetAddress * address, size_t peerCount, size_t channelL
host = (ENetHost *) enet_malloc (sizeof (ENetHost));
if (host == NULL)
return NULL;
memset (host, 0, sizeof (ENetHost));
host -> peers = (ENetPeer *) enet_malloc (peerCount * sizeof (ENetPeer));
if (host -> peers == NULL)