Merge pull request #34 from benbeshara/master
Fixed crash when editing textbox at non-end pos
This commit is contained in:
commit
f9a7f29889
2
.gitignore
vendored
2
.gitignore
vendored
@ -34,3 +34,5 @@
|
||||
|
||||
!tools/rGuiLayout/release/win32/rguilayout.exe
|
||||
!tools/rGuiStyler/release/win32/rguistyler.exe
|
||||
|
||||
.vscode/
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user