summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/account-server/accounthandler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/account-server/accounthandler.cpp b/src/account-server/accounthandler.cpp
index aada5dbb..7bd2a0a7 100644
--- a/src/account-server/accounthandler.cpp
+++ b/src/account-server/accounthandler.cpp
@@ -827,7 +827,7 @@ void AccountHandler::handleCharacterSelectMessage(AccountClient &client,
int slot = msg.readInt8();
Characters &chars = acc->getCharacters();
- if (slot < 1 || slot > (int)chars.size())
+ if (chars.find(slot) == chars.end())
{
// Invalid char selection
reply.writeInt8(ERRMSG_INVALID_ARGUMENT);