diff options
author | sapier <Sapier at GMX dot net> | 2013-05-25 19:23:10 +0200 |
---|---|---|
committer | sapier <Sapier at GMX dot net> | 2013-05-25 19:23:10 +0200 |
commit | e464f193566b3c4173b44d3bf6c82aa032d9fed7 (patch) | |
tree | e8f350b70b4759e9e24b2dd248d4c892236a07ca /src/script/lua_api | |
parent | ab433775777c4f5055bcf4d2a1cffc506c4f9961 (diff) | |
download | minetest-e464f193566b3c4173b44d3bf6c82aa032d9fed7.tar.gz minetest-e464f193566b3c4173b44d3bf6c82aa032d9fed7.tar.bz2 minetest-e464f193566b3c4173b44d3bf6c82aa032d9fed7.zip |
Fix itemstack:add item not working correct
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_item.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index e9997d489..730dfd49b 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -227,7 +227,7 @@ int LuaItemStack::l_add_item(lua_State *L) NO_MAP_LOCK_REQUIRED; LuaItemStack *o = checkobject(L, 1); ItemStack &item = o->m_stack; - ItemStack newitem = read_item(L,-2, STACK_TO_SERVER(L)); + ItemStack newitem = read_item(L,-1, STACK_TO_SERVER(L)); ItemStack leftover = item.addItem(newitem, STACK_TO_SERVER(L)->idef()); create(L, leftover); return 1; |