1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-19 15:20:27 +00:00

rulegen:: fixed a crash in generate_random_path when exploring a dead branch

This commit is contained in:
Zeno Rogue 2021-07-31 20:28:51 +02:00
parent 8e88ceb3bc
commit c588837375

View File

@ -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;
}