1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 13:07:16 +00:00

rulegen:: no crash if no giver

This commit is contained in:
Zeno Rogue 2024-03-19 18:53:37 +01:00
parent a82d9b2266
commit 0b526cbdfb

View File

@ -1566,6 +1566,7 @@ void minimize_rules() {
int new_ids = 0;
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);
if(!new_id_of.count(aid)) new_id_of[aid] = new_ids++;