diff options
author | sapier <Sapier at GMX dot net> | 2013-11-12 00:06:14 +0100 |
---|---|---|
committer | PilzAdam <pilzadam@minetest.net> | 2013-11-16 15:52:41 +0100 |
commit | 90e7832408eb313676d40b747ec533c3b07e5c28 (patch) | |
tree | b2cf6b99bbeb79e2cf519b040c8400cbae22ea9c /src/inventory.cpp | |
parent | 35606cfb679d2d5ead0780c84371089745630c1b (diff) | |
download | minetest-90e7832408eb313676d40b747ec533c3b07e5c28.tar.gz minetest-90e7832408eb313676d40b747ec533c3b07e5c28.tar.bz2 minetest-90e7832408eb313676d40b747ec533c3b07e5c28.zip |
Fix invalid listname and listsize not handled correctly in set_size
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 3 |
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; |