summaryrefslogtreecommitdiffhomepage
path: root/editor/draw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/draw.cpp')
-rw-r--r--editor/draw.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index dd4cf96b..5ee54863 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -56,7 +56,7 @@ clickable_scenery* app::find_clickable_scenery(Vector2i pixel_)
const auto pos_ = pixel - c.dest.min() + c.src.min();
const auto pos = c.atlas.group(c.item.r).mirror_from.isEmpty()
? pos_
- : Vector2ui(c.src.sizeX() - pos_[0], pos_[1]);
+ : Vector2ui(c.src.sizeX() - 1 - pos_[0], pos_[1]);
const auto stride = c.atlas.info().pixel_size[0];
std::size_t idx = pos.y() * stride + pos.x();
fm_debug_assert(idx < c.bitmask.size());