1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Extend capabilities of Address class

This commit is contained in:
sfan5
2024-01-01 15:35:46 +01:00
parent 171f911237
commit dc7fb26921
4 changed files with 111 additions and 49 deletions

View File

@@ -1621,7 +1621,8 @@ bool Game::connectToServer(const GameStartData &start_data,
try {
connect_address.Resolve(start_data.address.c_str());
if (connect_address.isZero()) { // i.e. INADDR_ANY, IN6ADDR_ANY
if (connect_address.isAny()) {
// replace with localhost IP
if (connect_address.isIPv6()) {
IPv6AddressBytes addr_bytes;
addr_bytes.bytes[15] = 1;