1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 15:40:26 +00:00

fixed push_deadstack in the root

This commit is contained in:
Zeno Rogue 2021-08-17 17:24:11 +02:00
parent 4c3800f2b4
commit c97290890e

View File

@ -1122,8 +1122,11 @@ void push_deadstack(vector<tsinfo>& hash, twalker w, tsinfo tsi, int dir) {
hash.push_back(tsi);
while(true) {
ufind(w);
if(isize(hash) > 10000) throw rulegen_failure("deadstack overflow");
tsi.second += dir; w += dir;
auto& ts = treestates[tsi.first];
if(ts.is_root) return;
if(tsi.second == 0 || tsi.second == isize(ts.rules)) {
w += wstep;
tsi = get_tsinfo(w);