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:
parent
8e88ceb3bc
commit
c588837375
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user