From e69f2f0c26043934bbbfdf2f6a6b95589d5ac6c2 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 14 Dec 2020 23:39:12 +0100 Subject: [PATCH] REVIEWED: DrawGrid(), issue with buffer limits check #1417 --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models.c b/src/models.c index d8e19807..edbbfb2b 100644 --- a/src/models.c +++ b/src/models.c @@ -657,7 +657,7 @@ void DrawGrid(int slices, float spacing) { int halfSlices = slices/2; - if (rlCheckBufferLimit(slices*4)) rlglDraw(); + if (rlCheckBufferLimit((slices + 2)*4)) rlglDraw(); rlBegin(RL_LINES); for (int i = -halfSlices; i <= halfSlices; i++)