From f9b0dcf8a0c8f854003de9b579fcf23e8e82703a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 27 Apr 2023 22:48:36 +0200 Subject: [PATCH] fixed some crashes on out_of_bounds --- geometry2.cpp | 1 + pcmove.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/geometry2.cpp b/geometry2.cpp index d1ec0cc8..2ba60a98 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -278,6 +278,7 @@ void virtualRebase_cell(cell*& base, T& at, const U& check) { while(true) { cell *newbase = NULL; forCellIdCM(c2, i, base) { + if(c2 == &out_of_bounds) continue; transmatrix V2 = currentmap->iadj(base, i); T cand_at = V2 * at; horo_distance newz(check(cand_at)); diff --git a/pcmove.cpp b/pcmove.cpp index 9fc04519..68895d8c 100644 --- a/pcmove.cpp +++ b/pcmove.cpp @@ -634,6 +634,7 @@ bool pcmove::actual_move() { mi = movei(cwt.at, d); cell *& c2 = mi.t; + if(c2 == &out_of_bounds) return false; good_tortoise = c2->monst == moTortoise && tortoise::seek() && !tortoise::diff(tortoise::getb(c2)) && !c2->item; if(items[itOrbGravity]) {