wumpus: Fix use after free leading to possible memory corruption when the wumpus eats a player
CID: 1170468
This commit is contained in:
parent
f9999a12bd
commit
ae9d0666af
8
wumpus.c
8
wumpus.c
|
@ -630,9 +630,11 @@ move_wumpus(void *unused)
|
||||||
/* player_t *p has been eaten and is no longer in the game */
|
/* player_t *p has been eaten and is no longer in the game */
|
||||||
resign_player(p);
|
resign_player(p);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
/* prepare for the next turn */
|
{
|
||||||
p->has_moved = false;
|
/* prepare for the next turn */
|
||||||
|
p->has_moved = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* report any wumpus kills */
|
/* report any wumpus kills */
|
||||||
|
|
Loading…
Reference in New Issue