fix: getaddrinfo(NULL) is valid apparently

This commit is contained in:
Ash Logan
2026-07-29 15:23:37 +10:00
parent 10688b5ac2
commit e1558493f2

View File

@@ -34,6 +34,7 @@ constexpr std::pair<const char *, const char *> dns_replacements[] = {
static const char * replace_dns_name(const char *dns_name) {
if (!Config::connect_to_network) return dns_name;
if (!dns_name) return dns_name;
for (auto [original, replacement] : dns_replacements) {
if (strcmp(original, dns_name) == 0)