From: havoc Date: Mon, 12 Nov 2007 02:07:28 +0000 (+0000) Subject: fix SLIF_FREESLOTS to not be an out of bounds array access X-Git-Tag: xonotic-v0.1.0preview~2798 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=257cfc53fb3547372c46a9c6dca137968d7e3b26;p=xonotic%2Fdarkplaces.git fix SLIF_FREESLOTS to not be an out of bounds array access hush an entry may be used uninitialized warning git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7683 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index 74161c95..ca412f53 100755 --- a/netconn.c +++ b/netconn.c @@ -1222,7 +1222,7 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address { int n; int pingtime; - serverlist_entry_t *entry; + serverlist_entry_t *entry = NULL; // search the cache for this server and update it for (n = 0;n < serverlist_cachecount;n++) { diff --git a/netconn.h b/netconn.h index b359c949..f211b1e4 100755 --- a/netconn.h +++ b/netconn.h @@ -275,8 +275,8 @@ typedef enum SLIF_PROTOCOL, SLIF_NUMBOTS, SLIF_NUMHUMANS, - SLIF_COUNT, - SLIF_FREESLOTS + SLIF_FREESLOTS, + SLIF_COUNT } serverlist_infofield_t; typedef enum