From f25da4f7f2c610982852c25c90b780adf025e0fd Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Sun, 24 Apr 2016 18:36:16 +0000 Subject: [PATCH] i'm a doofus and failed to notice the message is being returned as an array --- .../application/LoginServer/src/shared/ClientConnection.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp index c6610318..e2d6a3c9 100755 --- a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp @@ -231,11 +231,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string if (j.count("message")) { - // fuuuu hack here - .get() is returning an array and not a string, wtf? - errMsg = j["message"].dump(); - errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), '"'), errMsg.end()); - errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), ']'), errMsg.end()); - errMsg.erase(std::remove(errMsg.begin(), errMsg.end(), '['), errMsg.end()); + errMsg = j["message"][0].get(); } else {