1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix invalid listname and listsize not handled correctly in set_size

This commit is contained in:
sapier 2013-11-12 00:06:14 +01:00 committed by PilzAdam
parent 35606cfb67
commit 90e7832408
3 changed files with 21 additions and 3 deletions

View file

@ -957,6 +957,9 @@ InventoryList * Inventory::addList(const std::string &name, u32 size)
}
else
{
//don't create list with invalid name
if (name.find(" ") != std::string::npos) return NULL;
InventoryList *list = new InventoryList(name, size, m_itemdef);
m_lists.push_back(list);
return list;