mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 20:29:17 +00:00
racing:: fixed a potential crash if goal not found
This commit is contained in:
parent
c5e87f1d2d
commit
c797d4ccba
@ -1294,8 +1294,12 @@ void markers() {
|
|||||||
using namespace racing;
|
using namespace racing;
|
||||||
cell *goal = NULL;
|
cell *goal = NULL;
|
||||||
for(cell *c: track) if(inscreenrange(c)) goal = c;
|
for(cell *c: track) if(inscreenrange(c)) goal = c;
|
||||||
|
|
||||||
|
if(!goal) return;
|
||||||
|
|
||||||
hyperpoint H = tC0(ggmatrix(goal));
|
hyperpoint H = tC0(ggmatrix(goal));
|
||||||
if(invalid_point(H)) return;
|
if(invalid_point(H)) return;
|
||||||
|
|
||||||
queuechr(H, 2*vid.fsize, 'X', 0x10100 * int(128 + 100 * sintick(150)));
|
queuechr(H, 2*vid.fsize, 'X', 0x10100 * int(128 + 100 * sintick(150)));
|
||||||
queuestr(H, vid.fsize,
|
queuestr(H, vid.fsize,
|
||||||
#if CAP_CRYSTAL
|
#if CAP_CRYSTAL
|
||||||
|
Loading…
Reference in New Issue
Block a user