]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 74161c955112031c0d7b5739382ed7e4b94d8568..ca412f538ac0f481a3b61736962f0a66426176fd 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 b359c949c3d877a917e8e354cb1d2d029fe07798..f211b1e4924ab7f5eef993af0984b388dec6e738 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