summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2012-01-19 22:00:49 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-25 13:33:21 (GMT)
commitff6aa0227db6ca9e3572775064af625210b04374 (patch)
treebdea1ae8b12ebd6cafc063848496c857e269e300 /src
parentedcf6d7b2f3a9ba26fb4f1d9c91a291753463f56 (diff)
downloadpowder-ff6aa0227db6ca9e3572775064af625210b04374.zip
powder-ff6aa0227db6ca9e3572775064af625210b04374.tar.gz
transform_save should check wall coordinates against size in blocks, not the actual size
Fixes crash when rotating a section of wall that is wider than YRES
Diffstat (limited to 'src')
-rw-r--r--src/save.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/save.c b/src/save.c
index 69036af..f0055d8 100644
--- a/src/save.c
+++ b/src/save.c
@@ -2275,7 +2275,7 @@ void *transform_save(void *odata, int *size, matrix2d transform, vector2d transl
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])
{