wumpus: Fix use after free leading to possible memory corruption when the wumpus eats a player

CID: 1170468
This commit is contained in:
Attila Molnar 2014-09-18 01:55:17 +02:00
parent f9999a12bd
commit ae9d0666af
1 changed files with 5 additions and 3 deletions

View File

@ -630,9 +630,11 @@ move_wumpus(void *unused)
/* player_t *p has been eaten and is no longer in the game */
resign_player(p);
}
/* prepare for the next turn */
p->has_moved = false;
else
{
/* prepare for the next turn */
p->has_moved = false;
}
}
/* report any wumpus kills */