summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 2ce50e019..f4a87bec1 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -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;