So here's what happens:
When the second item is dropped on the floor, the list containing all the dropped items on that level being full, it is extended by using realloc().
Then, the pointer to the item is not more valid. The bug could be with MoveItem() in drop_item(). Need further investigation. |