Fix size error in BitMap.opaque_to_polygons

Previous estimate of upper limit on size was incorrect

(cherry picked from commit 249784ed53ff8b2b02507d6678dd6aecf511b067)
This commit is contained in:
Ninni Pipping
2023-05-12 12:10:50 +02:00
committed by Rémi Verschelde
parent 813fc0940d
commit 5d93de88a8
+1 -1
View File
@@ -354,7 +354,7 @@ Vector<Vector<Vector2>> BitMap::_march_square(const Rect2i &p_rect, const Point2
prevx = stepx;
prevy = stepy;
ERR_FAIL_COND_V((int)count > width * height, Vector<Vector<Vector2>>());
ERR_FAIL_COND_V((int)count > 2 * (width * height + 1), Vector<Vector<Vector2>>());
} while (curx != startx || cury != starty);
// Add remaining points to result.