1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-08-13 16:53:49 -04:00

Fix itemstack:add item not working correct

This commit is contained in:
sapier 2013-05-25 19:23:10 +02:00
parent ab43377577
commit e464f19356

View File

@ -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;