diff options
author | rubidium <rubidium@openttd.org> | 2009-04-09 21:36:09 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-04-09 21:36:09 +0000 |
commit | 28bce241fde51391b8f7be286962afd0b86a1edf (patch) | |
tree | c86bd2039ce35b79a2fcd4d734922b6438215d60 | |
parent | 8477e923868029226626b890a7c6ef10fe12fa9c (diff) | |
download | openttd-28bce241fde51391b8f7be286962afd0b86a1edf.tar.xz |
(svn r16005) -Fix: assertion when there is no last joined server; when you've got an unresolved address, the hostname cannot be resolved either so return it as-is.
-rw-r--r-- | src/network/core/address.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/core/address.cpp b/src/network/core/address.cpp index 159c9cf11..541b4673b 100644 --- a/src/network/core/address.cpp +++ b/src/network/core/address.cpp @@ -14,7 +14,7 @@ const char *NetworkAddress::GetHostname() { - if (StrEmpty(this->hostname)) { + if (StrEmpty(this->hostname) && this->address.ss_family != AF_UNSPEC) { assert(this->address_length != 0); getnameinfo((struct sockaddr *)&this->address, this->address_length, this->hostname, sizeof(this->hostname), NULL, 0, NI_NUMERICHOST); } |