Account for maxsubcnt overflowing

This commit is contained in:
Eddie Hung 2019-08-26 17:48:54 -07:00
parent b32d6bf403
commit 45c34c87ee
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ void generate_pattern(std::function<void(pm&,std::function<void()>)> run, const
run(matcher, [](){});
}
if (submodcnt)
if (submodcnt && maxsubcnt < (1 << 16))
maxsubcnt *= 2;
design->remove(mod);