Fix GuiTextSplit overrunning on max split count (#450)

Co-authored-by: segcore <segcore@github.com>
This commit is contained in:
segcore
2025-02-02 04:34:29 +08:00
committed by GitHub
parent c8a037cde1
commit 31b6ca3ccc

View File

@ -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;
}
}