Fix size error in `BitMap.opaque_to_polygons`

Previous estimate of upper limit on size was incorrect

(cherry picked from commit 48347499c2)
This commit is contained in:
Ninni Pipping 2023-04-28 11:45:08 +02:00 committed by Rémi Verschelde
parent 05ce396e8b
commit a9c451af33
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -318,7 +318,7 @@ Vector<Vector2> 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;
}