From feb55d26d226e21327478c44303edf705588d7d5 Mon Sep 17 00:00:00 2001 From: Ninni Pipping Date: Fri, 28 Apr 2023 11:45:08 +0200 Subject: [PATCH] Fix size error in `BitMap.opaque_to_polygons` Previous estimate of upper limit on size was incorrect --- scene/resources/bit_map.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index 0347f936b..a23291375 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -319,7 +319,7 @@ Vector BitMap::_march_square(const Rect2i &rect, const Point2i &start) prevx = stepx; prevy = stepy; - ERR_FAIL_COND_V((int)count > width * height, _points); + ERR_FAIL_COND_V((int)count > 2 * (width * height + 1), _points); } while (curx != startx || cury != starty); return _points; }