From 01a6e8dbe42fb6571ad846bee5e1d8cc7c9fba5e Mon Sep 17 00:00:00 2001 From: fusion32 Date: Thu, 16 Oct 2025 04:23:52 -0300 Subject: move ResolveHostName outside of GetCharacterEndpoints --- src/hostcache.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/hostcache.cc') diff --git a/src/hostcache.cc b/src/hostcache.cc index 23be08f..9fda094 100644 --- a/src/hostcache.cc +++ b/src/hostcache.cc @@ -58,7 +58,10 @@ static bool DoResolveHostName(const char *HostName, int *OutAddr){ } bool ResolveHostName(const char *HostName, int *OutAddr){ - ASSERT(HostName != NULL && !StringEmpty(HostName)); + if(HostName == NULL || StringEmpty(HostName)){ + return false; + } + THostCacheEntry *Entry = NULL; int LeastRecentlyUsedIndex = 0; int LeastRecentlyUsedTime = g_CachedHostNames[0].ResolveTime; -- cgit v1.2.3