From 192a263e7db99cf0b2c9b61f65ae07b53ab28d7a Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sat, 27 Dec 2008 00:55:03 -0500 Subject: Fixed bound checking on MapEffect positioning --- sigmod/MapTile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sigmod/MapTile.cpp') diff --git a/sigmod/MapTile.cpp b/sigmod/MapTile.cpp index 9c1affa0..bc978319 100644 --- a/sigmod/MapTile.cpp +++ b/sigmod/MapTile.cpp @@ -91,8 +91,8 @@ GETTER(MapTile, int, zIndex) CHECK_INDEX(MapTile, int, tile, sigmod(), tile) CHECK_BEGIN(MapTile, QPoint&, position) const Map* map = qobject_cast(parent()); - TBOUNDS_MOD(position_x, 0, map->width(), position.x()) - TBOUNDS_MOD(position_y, 0, map->height(), position.y()) + TBOUNDS_MOD(position_x, 0, map->width() - 1, position.x()) + TBOUNDS_MOD(position_y, 0, map->height() - 1, position.y()) CHECK_END() CHECK(MapTile, int, zIndex) -- cgit