diff --git a/src/ChatManager.cpp b/src/ChatManager.cpp index d278c5e..2cf0df6 100644 --- a/src/ChatManager.cpp +++ b/src/ChatManager.cpp @@ -762,10 +762,10 @@ void redeemCommand(std::string full, std::vector& args, CNSocket* s } int itemCount = ItemManager::CodeItems[code].size(); - int slots[4]; + std::vector slots; for (int i = 0; i < itemCount; i++) { - slots[i] = ItemManager::findFreeSlot(plr); + slots.push_back(ItemManager::findFreeSlot(plr)); if (slots[i] == -1) { ChatManager::sendServerMessage(sock, "/redeem: Not enough space in inventory");