1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-21 08:00:25 +00:00

fixed a possible buffer overflow while in finishshape()

This commit is contained in:
Zeno Rogue 2019-06-18 15:23:41 +02:00
parent 9a0b8935a3
commit adf0f36ea1

View File

@ -121,7 +121,7 @@ void geometry_information::finishshape() {
if(DIM == 3) { if(DIM == 3) {
using namespace hyperpoint_vec; using namespace hyperpoint_vec;
last->intester = Hypc; last->intester = Hypc;
for(int i=last->s; i<=last->e; i++) last->intester += hpc[i]; for(int i=last->s; i<last->e; i++) last->intester += hpc[i];
if(last->s != last->e) last->intester /= last->e-last->s; if(last->s != last->e) last->intester /= last->e-last->s;
} }