From ff6aa0227db6ca9e3572775064af625210b04374 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Fri, 20 Jan 2012 06:00:49 +0800 Subject: [PATCH] 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 --- src/save.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/save.c b/src/save.c index 69036afbf..f0055d8bb 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]) {