From 25dba5a13c764cc5b71be1d5c2ccedc3d2cd3022 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 25 Aug 2021 12:55:51 +0200 Subject: [PATCH] do not crash on memory clean in case of precision errors --- cell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cell.cpp b/cell.cpp index e10804ee..b5206338 100644 --- a/cell.cpp +++ b/cell.cpp @@ -380,7 +380,7 @@ EX void clearcell(cell *c) { if(c->move(t)->move(c->c.spin(t)) != NULL && 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)))); - exit(1); + if(worst_precision_error < 1e-3) exit(1); } c->move(t)->move(c->c.spin(t)) = NULL; }