# HG changeset patch # User John "Elwin" Edwards # Date 1518141274 18000 # Node ID 5a94c9b3181e537c67b5ee3e07ee57ef21964780 # Parent 317166b49d8a9d1ade3973756ca48d1e56aad94c UltraRogue: clear the next_obj field when removing items from the floor. The next_obj field is a pointer which the top item in a stack uses to keep a list of the other items. When removing an item from the stack, rem_obj() failed to set next_obj to NULL, which can cause items in monster inventory to point to items earlier in the inventory list. That causes infinite co-recursion when saving or restoring. diff -r 317166b49d8a -r 5a94c9b3181e urogue/things.c --- a/urogue/things.c Thu Feb 08 18:56:15 2018 -0500 +++ b/urogue/things.c Thu Feb 08 20:54:34 2018 -0500 @@ -292,6 +292,8 @@ if (op->next_obj) objptr->next_obj->l_prev = NULL; + objptr->next_obj = NULL; + y = op->o_pos.y; x = op->o_pos.x;