mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix invalid listname and listsize not handled correctly in set_size
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user