# HG changeset patch # User John "Elwin" Edwards # Date 1487122953 18000 # Node ID c7c6c5a7d840d310decd9a3d15308c8c5b985f73 # Parent ac42afd962e485c2d189963243d3726ba08498d9 UltraRogue: fix a segfault related to restoring monsters. The functions for restoring saved games failed to properly correct the t_chasee pointer of monsters chasing the player. Such monsters would attempt to chase NULL instead, with predictable results. diff -r ac42afd962e4 -r c7c6c5a7d840 urogue/state.c --- a/urogue/state.c Sun Feb 12 20:16:57 2017 -0500 +++ b/urogue/state.c Tue Feb 14 20:42:33 2017 -0500 @@ -678,7 +678,7 @@ { while(l != NULL) { - if (l->data.th->t_chasee == (void *) -1L) + if (l->data.th->chasee_index == -1L) l->data.th->t_chasee = &player; else l->data.th->t_chasee = find_thing(mlist, l->data.th->chasee_index); @@ -1340,7 +1340,7 @@ beast = find_thing(mlist, i); ur_fixup_monsters(fam_ptr); - ur_fixup_monsters(fam_ptr); + ur_fixup_monsters(mlist); DUMPSTRING i = ur_read_int(savef);