diff options
author | Treeston <treeston.mmoc@gmail.com> | 2020-09-24 22:12:46 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-02-27 23:53:16 +0100 |
commit | 150f10817427d57e37c9865bc2c1a380ef048eb7 (patch) | |
tree | 203f6c4b4b63a49d3dbffc7f50c296d8eb776fe2 /src/server/scripts/Commands | |
parent | 8585b127f4ee8d6bd30ce2e413ce7676fba097ac (diff) |
Scripts/Commands: Fix a potential crash in cs_account.cpp
(cherry picked from commit 7bf9a0640e57f4e44a80b6fd91e8f46fd7fb9c72)
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r-- | src/server/scripts/Commands/cs_account.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 0b54b04983e..75e191c3fba 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. |