diff options
author | Bernhard Liebl <Bernhard.Liebl@gmx.org> | 2018-03-04 21:19:32 +0100 |
---|---|---|
committer | Bernhard Liebl <Bernhard.Liebl@gmx.org> | 2018-03-04 21:19:32 +0100 |
commit | 5f917139ab4050b9e03edff71ceeb5cff7abd386 (patch) | |
tree | 84744654cbb5d5a7271e7126a77afc06e8641ed6 | |
parent | 79a07527ab87de385bf8fd8f7f9d7f09e55a77dc (diff) |
Fix uninitialized data in Sprite::_get_rects()
-rw-r--r-- | scene/2d/sprite.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index 796969be1e..0dd02a982c 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -73,8 +73,8 @@ void Sprite::_get_rects(Rect2 &r_src_rect, Rect2 &r_dst_rect, bool &r_filter_cli s = s / Size2(hframes, vframes); r_src_rect.size = s; - r_src_rect.position.x += float(frame % hframes) * s.x; - r_src_rect.position.y += float(frame / hframes) * s.y; + r_src_rect.position.x = float(frame % hframes) * s.x; + r_src_rect.position.y = float(frame / hframes) * s.y; } Point2 ofs = offset; |