From 6179036ac920aea0a84cab0c9629b8ed15bbe8ba Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 24 Jan 2011 01:55:12 +0000 Subject: [PATCH] Fix name resolution for domains with A and AAAA record --- code/qcommon/net_ip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 1c03e1bf..6874d2bf 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -309,11 +309,11 @@ static qboolean Sys_StringToSockaddr(const char *s, struct sockaddr *sadr, int s if(search) { - if(res->ai_addrlen > sadr_len) - res->ai_addrlen = sadr_len; + if(search->ai_addrlen > sadr_len) + search->ai_addrlen = sadr_len; - memcpy(sadr, res->ai_addr, res->ai_addrlen); - freeaddrinfo(res); + memcpy(sadr, search->ai_addr, search->ai_addrlen); + freeaddrinfo(search); return qtrue; }