From c5888373751112266cc343e2bca4bc5abd791df0 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 31 Jul 2021 20:28:51 +0200 Subject: [PATCH] rulegen:: fixed a crash in generate_random_path when exploring a dead branch --- geometry2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geometry2.cpp b/geometry2.cpp index bb04af1a..f7255ad8 100644 --- a/geometry2.cpp +++ b/geometry2.cpp @@ -912,9 +912,9 @@ EX pathgen generate_random_path(cellwalker start, int length, bool for_yendor, b if(!launched) { t = ycw.at->master->fieldval; bignum b = expansion.get_descendants(length-i, t); + if(!full_id.approx_int()) goto stupid; p.full_id_0 = full_id = hrand(b); /* it may happen that the subtree dies out */ - if(!full_id.approx_int()) goto stupid; launched = true; }