]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
watch your memory :)
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Nov 2007 11:56:32 +0000 (11:56 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 9 Nov 2007 11:56:32 +0000 (11:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7665 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c

index bb1b7e9d0939885e01c566849feeda0b8efc78ed..ae4928ef4ba7888cec129c6b1a24bdccf2171d35 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1239,7 +1239,9 @@ static int NetConn_ClientParsePacket_ServerList_ProcessReply(const char *address
                if (serverlist_cachecount == SERVERLIST_TOTALSIZE)
                        return -1;
 
-               memset(&entry, 0, sizeof(*entry));
+               entry = &serverlist_cache[n];
+
+               memset(entry, 0, sizeof(*entry));
                // store the data the engine cares about (address and ping)
                strlcpy(entry->info.cname, addressstring, sizeof(entry->info.cname));
                entry->info.ping = 100000;