From 31b6ca3cccc6bbc4969219b134806ab397995934 Mon Sep 17 00:00:00 2001 From: segcore <44293604+segcore@users.noreply.github.com> Date: Sun, 2 Feb 2025 04:34:29 +0800 Subject: [PATCH] Fix GuiTextSplit overrunning on max split count (#450) Co-authored-by: segcore --- src/raygui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index 99d6c74..e2697b8 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -5269,7 +5269,7 @@ static const char **GuiTextSplit(const char *text, char delimiter, int *count, i buffer[i] = '\0'; // Set an end of string at this point counter++; - if (counter > RAYGUI_TEXTSPLIT_MAX_ITEMS) break; + if (counter >= RAYGUI_TEXTSPLIT_MAX_ITEMS) break; } }