1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

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

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;