rulegen:: fixed UB in get_corner while doing floorshapes

This commit is contained in:
Zeno Rogue 2021-07-31 14:37:53 +02:00
parent c8b4d6b159
commit e8a8a75620
1 changed files with 1 additions and 0 deletions

View File

@ -1462,6 +1462,7 @@ struct hrmap_rulegen : hrmap {
hyperpoint get_corner(cell *c, int cid, ld cf) {
if(c->master->fieldval == -1) {
auto& sh = arb::current_or_slided().shapes[c->master->zebraval];
cid = gmod(cid, sh.size());
return normalize(C0 + (sh.vertices[cid] - C0) * 3 / cf);
}
int s = c->master->fieldval;