From 9a9edd89b489848f5860e4ca6735be42fab9ec66 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 18 May 2024 07:40:42 +0200 Subject: [PATCH] Update raygui.h --- src/raygui.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/raygui.h b/src/raygui.h index f9a4c3d..5b837d0 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -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) {