fix SLIF_FREESLOTS to not be an out of bounds array access
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Nov 2007 02:07:28 +0000 (02:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 12 Nov 2007 02:07:28 +0000 (02:07 +0000)
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
netconn.h

index 74161c9..ca412f5 100755 (executable)
--- 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++) {
index b359c94..f211b1e 100755 (executable)
--- 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