From: sapier Date: Sat, 25 May 2013 17:23:10 +0000 (+0200) Subject: Fix itemstack:add item not working correct X-Git-Tag: 0.4.7~14^2~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e464f193566b3c4173b44d3bf6c82aa032d9fed7;p=oweals%2Fminetest.git Fix itemstack:add item not working correct --- 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;