From 7bf9a0640e57f4e44a80b6fd91e8f46fd7fb9c72 Mon Sep 17 00:00:00 2001 From: Treeston Date: Thu, 24 Sep 2020 22:12:46 +0200 Subject: Scripts/Commands: Fix a potential crash in cs_account.cpp --- src/server/scripts/Commands/cs_account.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index cd8d5791d9e..bce351e378d 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -697,9 +697,10 @@ public: uint32 playerSecurity; if (handler->IsConsole()) - playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), realmID); - else playerSecurity = SEC_CONSOLE; + else + playerSecurity = AccountMgr::GetSecurity(handler->GetSession()->GetAccountId(), realmID); + // can set security level only for target with less security and to less security that we have // This also restricts setting handler's own security. -- cgit v1.2.3