From 853c66baedb342968c818e62422eb043ba4fb0c7 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 10 Sep 2022 23:56:52 +0200 Subject: [PATCH] REVIEWED: `CheckCollisionPointPoly()` --- src/rshapes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rshapes.c b/src/rshapes.c index 12ed247f6..0a016eabb 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];