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

This commit is contained in:
TheLastRar 2021-05-21 14:36:51 +01:00 committed by lightningterror
parent 7a7f98955b
commit 91c2f62c9e
1 changed files with 2 additions and 2 deletions

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)
{