mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-28 21:32:49 +00:00
rulegen:: fixed a crash in generate_random_path when exploring a dead branch
This commit is contained in:
parent
8e88ceb3bc
commit
c588837375
@ -912,9 +912,9 @@ EX pathgen generate_random_path(cellwalker start, int length, bool for_yendor, b
|
|||||||
if(!launched) {
|
if(!launched) {
|
||||||
t = ycw.at->master->fieldval;
|
t = ycw.at->master->fieldval;
|
||||||
bignum b = expansion.get_descendants(length-i, t);
|
bignum b = expansion.get_descendants(length-i, t);
|
||||||
|
if(!full_id.approx_int()) goto stupid;
|
||||||
p.full_id_0 = full_id = hrand(b);
|
p.full_id_0 = full_id = hrand(b);
|
||||||
/* it may happen that the subtree dies out */
|
/* it may happen that the subtree dies out */
|
||||||
if(!full_id.approx_int()) goto stupid;
|
|
||||||
launched = true;
|
launched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user