1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-17 18:54:48 +00:00

do not crash on memory clean in case of precision errors

This commit is contained in:
Zeno Rogue 2021-08-25 12:55:51 +02:00
parent 42d87d39ac
commit 25dba5a13c

View File

@ -380,7 +380,7 @@ EX void clearcell(cell *c) {
if(c->move(t)->move(c->c.spin(t)) != NULL && if(c->move(t)->move(c->c.spin(t)) != NULL &&
c->move(t)->move(c->c.spin(t)) != c) { c->move(t)->move(c->c.spin(t)) != c) {
DEBB(DF_MEMORY | DF_ERROR, (format("cell error: type = %d %d -> %d\n", c->type, t, c->c.spin(t)))); DEBB(DF_MEMORY | DF_ERROR, (format("cell error: type = %d %d -> %d\n", c->type, t, c->c.spin(t))));
exit(1); if(worst_precision_error < 1e-3) exit(1);
} }
c->move(t)->move(c->c.spin(t)) = NULL; c->move(t)->move(c->c.spin(t)) = NULL;
} }