From 6aaf9aaf3b72276078396d39e83cd3b605d49fb8 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Wed, 3 Apr 2019 23:36:26 -0300 Subject: Core/Misc: Warning fixes (/W4) (#23149) * Core/Misc: Warning fixes (/W4) (cherry picked from commit 50f122de778bca324d0f4c81f1e8eb30b90a7314) --- src/server/scripts/Commands/cs_account.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 56d93f71096..9c4503560c2 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -524,7 +524,15 @@ public: uint32 accountId; if (accountName) { - if (!Utf8ToUpperOnlyLatin(*accountName) || !(accountId = AccountMgr::GetId(*accountName))) + if (!Utf8ToUpperOnlyLatin(*accountName)) + { + handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName->c_str()); + handler->SetSentErrorMessage(true); + return false; + } + + accountId = AccountMgr::GetId(*accountName); + if (!accountId) { handler->PSendSysMessage(LANG_ACCOUNT_NOT_EXIST, accountName->c_str()); handler->SetSentErrorMessage(true); -- cgit v1.2.3