mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-28 07:52:53 +00:00
rulegen:: no crash if no giver
This commit is contained in:
parent
a82d9b2266
commit
0b526cbdfb
@ -1566,6 +1566,7 @@ void minimize_rules() {
|
|||||||
int new_ids = 0;
|
int new_ids = 0;
|
||||||
|
|
||||||
for(int id=0; id<next_id; id++) {
|
for(int id=0; id<next_id; id++) {
|
||||||
|
if(treestates[id].giver.at == nullptr) { new_id[id] = new_ids++; println(hlog, "no giver in minimize_rules for state ", id); continue; }
|
||||||
auto aid = get_aid(treestates[id].giver);
|
auto aid = get_aid(treestates[id].giver);
|
||||||
|
|
||||||
if(!new_id_of.count(aid)) new_id_of[aid] = new_ids++;
|
if(!new_id_of.count(aid)) new_id_of[aid] = new_ids++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user