From 247e8b6e5d06fdf3e82551e297b93c33c98fa81c Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 6 Dec 2011 15:32:41 +0200 Subject: A small robustness addition to ItemStack --- src/scriptapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3