From db3bc0a260cd26ee58d53d2b0531d0c0c471ccd0 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Tue, 6 Apr 2010 16:33:38 -0600 Subject: Fix a crash when adding new servers Reviewed-by: Chuck Miller --- src/net/serverinfo.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/net') diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index adfdee7e..8b5b8f9d 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -36,22 +36,24 @@ public: EATHENA }; + typedef std::pair VersionString; + Type type; std::string name; std::string hostname; unsigned short port; std::string description; + VersionString version; bool save; - bool meetsMinimumVersion; ServerInfo() { type = UNKNOWN; port = 0; save = false; - meetsMinimumVersion = true; + version.first = 0; } ServerInfo(const ServerInfo &info) @@ -61,8 +63,9 @@ public: hostname = info.hostname; port = info.port; description = info.description; + version.first = info.version.first; + version.second = info.version.second; save = info.save; - meetsMinimumVersion = info.meetsMinimumVersion; } bool isValid() const @@ -77,8 +80,9 @@ public: hostname.clear(); port = 0; description.clear(); + version.first = 0; + version.second.clear(); save = false; - meetsMinimumVersion = true; } bool operator==(const ServerInfo &other) const -- cgit v1.2.3-70-g09d2