From 1f5951dbee0295364ff686d4ddf4d0cf55d31042 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 26 Dec 2020 17:16:51 +0100 Subject: [PATCH] fixed a crash bug when collecting an Orb of Safety via Orb of Water --- complex.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/complex.cpp b/complex.cpp index e90cfca6..72d5a159 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2455,8 +2455,11 @@ EX void livecaves() { else if(c->land == laLivefjord) { if(hv > 0 && c->wall == waStrandedBoat) c->wall = waBoat; if(hv > 0 && c->wall == waNone) { - if(c->item && c->cpdist == 1 && markOrb(itOrbWater)) + if(c->item && c->cpdist == 1 && markOrb(itOrbWater)) { + bool saf = c->item == itOrbSafety; collectItem(c); + if(saf) return; + } c->wall = waSea; } if(hv < 0 && c->wall == waBoat) c->wall = waStrandedBoat;