aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorGustavo <sirikfoll@hotmail.com>2019-04-03 23:36:26 -0300
committerShauren <shauren.trinity@gmail.com>2021-11-26 11:18:15 +0100
commit6aaf9aaf3b72276078396d39e83cd3b605d49fb8 (patch)
treed351bac363ac24688455a8cc2932a61d342c1e52 /src/server/scripts
parent5aa0539d4b9e0ea83e0daf693b428d0687291777 (diff)
Core/Misc: Warning fixes (/W4) (#23149)
* Core/Misc: Warning fixes (/W4) (cherry picked from commit 50f122de778bca324d0f4c81f1e8eb30b90a7314)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp10
1 files changed, 9 insertions, 1 deletions
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);