projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a416cf7
)
Fix the previous commit
author
Perttu Ahola
<celeron55@gmail.com>
Fri, 2 Dec 2011 00:04:25 +0000
(
02:04
+0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Fri, 2 Dec 2011 00:04:25 +0000
(
02:04
+0200)
src/scriptapi.cpp
patch
|
blob
|
history
diff --git
a/src/scriptapi.cpp
b/src/scriptapi.cpp
index 359c1448299cdc3f2b6c7e0fa06acacbb4bf5cd9..951ff6f83b89eda8e6ebbd5e6674493c78d1d501 100644
(file)
--- a/
src/scriptapi.cpp
+++ b/
src/scriptapi.cpp
@@
-420,7
+420,8
@@
static void inventory_set_list_from_lua(Inventory *inv, const char *name,
// removes value, keeps key for next iteration
lua_pop(L, 1);
}
- InventoryList *invlist = inv->addList(name, items.size());
+ int listsize = (forcesize != -1) ? forcesize : items.size();
+ InventoryList *invlist = inv->addList(name, listsize);
int index = 0;
for(std::list<std::string>::const_iterator
i = items.begin(); i != items.end(); i++){