From 257cfc53fb3547372c46a9c6dca137968d7e3b26 Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 12 Nov 2007 02:07:28 +0000 Subject: [PATCH] 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 --- netconn.c | 2 +- netconn.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.39.2