mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-31 00:15:55 -04:00
i'm a doofus and failed to notice the message is being returned as an array
This commit is contained in:
@@ -231,11 +231,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
|
||||
if (j.count("message"))
|
||||
{
|
||||
// fuuuu hack here - .get<cstd::string>() 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<std::string>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user