summaryrefslogtreecommitdiff
path: root/scene/2d/sprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/sprite.cpp')
-rw-r--r--scene/2d/sprite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp
index ba103a8bf0..a8c7622828 100644
--- a/scene/2d/sprite.cpp
+++ b/scene/2d/sprite.cpp
@@ -363,7 +363,7 @@ Rect2 Sprite::get_rect() const {
Point2 ofs = offset;
if (centered)
- ofs -= s / 2;
+ ofs -= Size2(s) / 2;
if (s == Size2(0, 0))
s = Size2(1, 1);