Make ItemStack:set_count(0) clear the item stack

fixes minetest/minetest_game#786
This commit is contained in:
sfan5 2016-01-15 13:40:59 +01:00
parent da686160c3
commit a58c0f458d
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ int LuaItemStack::l_set_count(lua_State *L)
bool status;
lua_Integer count = luaL_checkinteger(L, 2);
if (count <= 65535) {
if (count > 0 && count <= 65535) {
item.count = count;
status = true;
} else {