Skip to content

Commit

Permalink
Don't crash if a wizard flees the Vaults without a rune.
Browse files Browse the repository at this point in the history
Entering the Vaults via the stairs and then leaving with &u triggered
an ASSERT in _rune_effect().

Fix this by briefly "unlocking" the Vaults as the wizard escapes.
  • Loading branch information
Aliscans committed Nov 16, 2024
1 parent 6b26e9b commit 0ef7745
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crawl-ref/source/wiz-dgn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ void wizard_level_travel(bool down)

if (down)
down_stairs(stairs, false, false);
else if (stairs == DNGN_EXIT_VAULTS && vaults_is_locked())
{
unlock_vaults();
up_stairs(stairs, false);
lock_vaults();
}
else
up_stairs(stairs, false);

Expand Down

0 comments on commit 0ef7745

Please sign in to comment.