summaryrefslogtreecommitdiff
path: root/src/simulation/Simulation.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-17 15:09:37 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-17 15:11:07 (GMT)
commitf4e2d188c26b70e9a712906861a30cac05b2031e (patch)
treee8c512e6fb1b1206eca6b8d3805b443fd26729b2 /src/simulation/Simulation.cpp
parent027833fe20dabdc49e4584a22c63c83ea8d508a3 (diff)
downloadpowder-f4e2d188c26b70e9a712906861a30cac05b2031e.zip
powder-f4e2d188c26b70e9a712906861a30cac05b2031e.tar.gz
transform_save should check wall coordinates against size in blocks, not the actual size ff6aa0227d
Diffstat (limited to 'src/simulation/Simulation.cpp')
-rw-r--r--src/simulation/Simulation.cpp2
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])
{