From: divverent Date: Fri, 9 Nov 2007 11:56:32 +0000 (+0000) Subject: watch your memory :) X-Git-Tag: xonotic-v0.1.0preview~2816 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6576fad4aa5e6a870e49f1e9a334e90ccb080c53;p=xonotic%2Fdarkplaces.git watch your memory :) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7665 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index bb1b7e9d..ae4928ef 100755 --- 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;