mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-29 23:15:56 -04:00
TEMP FIX HACK TODO - for whatever reason spaced strings seem to return as arrays when using the json parser's .get function
This commit is contained in:
@@ -231,7 +231,11 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
|
||||
if (j.count("message"))
|
||||
{
|
||||
errMsg = j["message"].get<std::string>();
|
||||
// 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());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user