diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2008-12-27 00:55:03 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2008-12-27 00:55:03 -0500 |
| commit | 192a263e7db99cf0b2c9b61f65ae07b53ab28d7a (patch) | |
| tree | ce67c8883f859c65d4c347bf20fbe80c24e05207 | |
| parent | 05d9ee7842b20b12e6b551c33766b6ab5ace1df8 (diff) | |
Fixed bound checking on MapEffect positioning
| -rw-r--r-- | sigmod/MapTile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<const Map*>(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) |
