DEV9: Fix off by one error with manual DNS1, auto DNS2

This commit is contained in:
TheLastRar authored and lightningterror committed 2021-05-27 16:07:18 +02:00
1 parent 7a7f98955b
commit 91c2f62c9e
1 file changed
+2 -2
+2 -2
View File
@@ -290,8 +290,8 @@ namespace InternalServers
//Use adapter's DNS2 if it has one
//otherwise use adapter's DNS1
if (dnsIPs.size() >= 1)
dns2 = dnsIPs[std::min((size_t)2, dnsIPs.size())];
if (!dnsIPs.empty())
dns2 = dnsIPs[std::min<size_t>(1, dnsIPs.size() - 1)];
}
if (dns1.integer == 0 && dns2.integer != 0)
{