From 6576fad4aa5e6a870e49f1e9a334e90ccb080c53 Mon Sep 17 00:00:00 2001 From: divverent Date: Fri, 9 Nov 2007 11:56:32 +0000 Subject: [PATCH] watch your memory :) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7665 d7cf8633-e32d-0410-b094-e92efae38249 --- netconn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.2