From 80d437f552f60c7cf1d69a2b90f43a27030d04c8 Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Thu, 26 Jan 2017 22:04:36 +0100 Subject: Make ClientInfo-Deserializing backwards compatible --- src/ClientInfo.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ClientInfo.hpp b/src/ClientInfo.hpp index c29ea40..e01b2a2 100644 --- a/src/ClientInfo.hpp +++ b/src/ClientInfo.hpp @@ -166,12 +166,15 @@ public: case Auto: break; case Clonk: { - if(parts.length() != 6) throw ConfigException("Cannot read corrupt ClientInfo with Clonk-ClientInterface: " + string.toStdString()); + if(parts.length() != 6 && parts.length() != 5) throw ConfigException("Cannot read corrupt ClientInfo with Clonk-ClientInterface: " + string.toStdString()); info.pcName = parts.at(1); info.CUID = parts.at(2).toInt(); info.nick = parts.at(3); info.activated = ConfigValueBase::getValue(parts.at(4)); - info.players = ConfigValueBase::getValue>(parts.at(5)); + if(parts.length() > 5) + { + info.players = ConfigValueBase::getValue>(parts.at(5)); + } break; } case IRC: -- cgit v1.2.3-54-g00ecf