diff options
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 660c723..f25a124 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -819,7 +819,7 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec pos = v2d_add(m2d_multiply_v2d(transform,pos),translate); nx = pos.x/CELL; ny = pos.y/CELL; - if (nx<0 || nx>=nw || ny<0 || ny>=nh) + if (nx<0 || nx>=nw/CELL || ny<0 || ny>=nh/CELL) continue; if (bmapo[y][x]) { |
