From: Perttu Ahola Date: Tue, 6 Dec 2011 13:32:41 +0000 (+0200) Subject: A small robustness addition to ItemStack X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=247e8b6e5d06fdf3e82551e297b93c33c98fa81c;p=zefram%2Fminetest%2Fminetest_engine.git A small robustness addition to ItemStack --- diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index f1035516..8a4e0b0d 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 {