Skip to content
Snippets Groups Projects
Commit a58c0f45 authored by sfan5's avatar sfan5
Browse files

Make ItemStack:set_count(0) clear the item stack

fixes minetest/minetest_game#786
parent da686160
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment