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:
parent
35606cfb67
commit
90e7832408
3 changed files with 21 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue