Merge pull request #11524 from marcelofg55/fix_bucket_infloop

Fix possible infinite loop with bucket fill tool
This commit is contained in:
Rémi Verschelde 2017-09-24 10:33:21 +02:00 committed by GitHub
commit 55a36b7101

View file

@ -351,6 +351,10 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
return PoolVector<Vector2>();
}
if (id == prev_id) {
return PoolVector<Vector2>();
}
Rect2i r = node->get_item_rect();
r.position = r.position / node->get_cell_size();
r.size = r.size / node->get_cell_size();