diff --git a/.gitignore b/.gitignore index b882c2f..24abda9 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,6 @@ *.su !tools/rGuiLayout/release/win32/rguilayout.exe -!tools/rGuiStyler/release/win32/rguistyler.exe \ No newline at end of file +!tools/rGuiStyler/release/win32/rguistyler.exe + +.vscode/ \ No newline at end of file diff --git a/src/raygui.h b/src/raygui.h index 20d4472..ea2d94b 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -2334,7 +2334,7 @@ RAYGUIDEF bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editM int startIdx = GuiTextBoxGetByteIndex(text, 0, 0, guiTextBoxState.cursor); int endIdx = startIdx + sz; - if (endIdx <= textSize) + if (endIdx <= textSize && length < textSize - 1) { guiTextBoxState.cursor++; guiTextBoxState.select = -1;