mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-30 03:50:34 +00:00
rulegen:: fixed UB in get_corner while doing floorshapes
This commit is contained in:
parent
c8b4d6b159
commit
e8a8a75620
@ -1462,6 +1462,7 @@ struct hrmap_rulegen : hrmap {
|
|||||||
hyperpoint get_corner(cell *c, int cid, ld cf) {
|
hyperpoint get_corner(cell *c, int cid, ld cf) {
|
||||||
if(c->master->fieldval == -1) {
|
if(c->master->fieldval == -1) {
|
||||||
auto& sh = arb::current_or_slided().shapes[c->master->zebraval];
|
auto& sh = arb::current_or_slided().shapes[c->master->zebraval];
|
||||||
|
cid = gmod(cid, sh.size());
|
||||||
return normalize(C0 + (sh.vertices[cid] - C0) * 3 / cf);
|
return normalize(C0 + (sh.vertices[cid] - C0) * 3 / cf);
|
||||||
}
|
}
|
||||||
int s = c->master->fieldval;
|
int s = c->master->fieldval;
|
||||||
|
Loading…
Reference in New Issue
Block a user