Would it make sense to make the inv->drop_stack a pointer? so instead of just setting the values item/quantity to zero, we could use a NULL pointer. I'd guess that would improve readability a little, as we do not need to deal with setting the internals of an ItemStack, but we just need to delete it and set to 0, which could go into a function inv->remove_drop_stack?

This comment is just a thought, it may or may not be not a good idea.