fix an iteration mistake

This commit is contained in:
Bigfoot71 2024-06-23 22:17:04 +02:00
parent 762b7d5e1d
commit 8d4dc8eafb

View File

@ -3795,9 +3795,9 @@ void ImageDrawTriangleFan(Image *dst, Vector2 *points, int pointCount, Color col
{
if (pointCount >= 3)
{
for (int i = 1; i < pointCount; i++)
for (int i = 1; i < pointCount - 1; i++)
{
ImageDrawTriangle(dst, points[0], points[i + 1], points[i + 2], color);
ImageDrawTriangle(dst, points[0], points[i], points[i + 1], color);
}
}
}