summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/rshapes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rshapes.c b/src/rshapes.c
index 12ed247f..0a016eab 100644
--- a/src/rshapes.c
+++ b/src/rshapes.c
@@ -1555,7 +1555,7 @@ bool CheckCollisionPointPoly(Vector2 point, Vector2 *points, int pointCount)
if (pointCount > 2)
{
- for (int i = 0; i < pointCount; i++)
+ for (int i = 0; i < pointCount - 1; i++)
{
Vector2 vc = points[i];
Vector2 vn = points[i + 1];