Merge pull request #76536 from AThousandShips/bit_poly_size

Fix size error in `BitMap.opaque_to_polygons`
This commit is contained in:
Rémi Verschelde 2023-05-08 13:52:46 +02:00
commit c9f81045be
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

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.