Update raygui.h

This commit is contained in:
Ray 2024-05-18 07:40:42 +02:00
parent 12804826d0
commit 9a9edd89b4

View File

@ -2582,7 +2582,9 @@ int GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
// Move backward text from cursor position
for (int i = (textBoxCursorIndex - prevCodepointSize); i < textLength; i++) text[i] = text[i + prevCodepointSize];
// TODO Check: >= cursor+codepointsize and <= length-codepointsize
// Prevent cursor index from decrementing past 0
if (textBoxCursorIndex > 0)
{