1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-17 16:32:50 +00:00

fixed an out-of-bound crash when doing finishshape on an empty shape

This commit is contained in:
Zeno Rogue 2025-06-07 17:16:29 +02:00
parent 2c227ea0ee
commit d4bb23b8eb

View File

@ -242,6 +242,7 @@ void geometry_information::finishshape() {
if(allminus || allplus) last->flags |= POLY_CCONVEX;
allplus = true, allminus = true;
if(last->s == isize(hpc)) { last = NULL; return; }
ld cx = hpc[last->s][0], cy = hpc[last->s][1];
for(int i=last->s; i<last->e-1; i++) {