mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-22 17:37:39 +00:00
rulegen:: fixed a crash in generate_random_path when exploring a dead branch
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user