aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-06 15:32:41 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-01-02 01:49:38 +0200
commit247e8b6e5d06fdf3e82551e297b93c33c98fa81c (patch)
treed601b2bf852a4bca2b59cdca38077655209bed88
parentb760e2ba23d607fa90022c082ba26a07408f0712 (diff)
downloadminetest-247e8b6e5d06fdf3e82551e297b93c33c98fa81c.tar.gz
minetest-247e8b6e5d06fdf3e82551e297b93c33c98fa81c.tar.bz2
minetest-247e8b6e5d06fdf3e82551e297b93c33c98fa81c.zip
A small robustness addition to ItemStack
-rw-r--r--src/scriptapi.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp
index f1035516a..8a4e0b0d9 100644
--- a/src/scriptapi.cpp
+++ b/src/scriptapi.cpp
@@ -1496,7 +1496,7 @@ private:
{
ItemStack *o = checkobject(L, 1);
push_stack_item(L, o->m_stack);
- if(o->m_stack->getCount() == 1){
+ if(o->m_stack->getCount() <= 1){
delete o->m_stack;
o->m_stack = NULL;
} else {