mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-31 00:15:55 -04:00
just evaluate these as bools
This commit is contained in:
@@ -216,7 +216,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
{
|
||||
json j = json::parse(readBuffer);
|
||||
|
||||
if (j.count("status") != 0 && j["status"].get<std::string>() == "success")
|
||||
if (j.count("status") && j["status"].get<std::string>() == "success")
|
||||
{
|
||||
LoginServer::getInstance().onValidateClient(suid, id, this, true, NULL, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
}
|
||||
@@ -224,7 +224,7 @@ void ClientConnection::validateClient(const std::string & id, const std::string
|
||||
{
|
||||
std::string errMsg;
|
||||
|
||||
if (j.count("message") != 0)
|
||||
if (j.count("message"))
|
||||
{
|
||||
errMsg = j["message"].get<std::string>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user