projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da68616
)
Make ItemStack:set_count(0) clear the item stack
author
sfan5
<sfan5@live.de>
Fri, 15 Jan 2016 12:40:59 +0000
(13:40 +0100)
committer
sfan5
<sfan5@live.de>
Fri, 15 Jan 2016 12:44:45 +0000
(13:44 +0100)
fixes minetest/minetest_game#786
src/script/lua_api/l_item.cpp
patch
|
blob
|
history
diff --git
a/src/script/lua_api/l_item.cpp
b/src/script/lua_api/l_item.cpp
index 842b157090bdbb9e9ce7a1933d9a93c7d22c520d..5381cba7616c0c62378372d4e57b3273e5b17c83 100644
(file)
--- a/
src/script/lua_api/l_item.cpp
+++ b/
src/script/lua_api/l_item.cpp
@@
-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 {