raygui icon indicating copy to clipboard operation
raygui copied to clipboard

Issue with Unicode input on `GuiTextBox()`

Open electrolys opened this issue 1 year ago • 1 comments

gui textbox doesn't handle adding and removing characters properly and causes an underflow (at adding) and overflow (at removal)

at lines https://github.com/raysan5/raygui/blob/6f532337ff2d6dc14ba3a5f5b7ee63f9d90ff13b/src/raygui.h#L2582 https://github.com/raysan5/raygui/blob/6f532337ff2d6dc14ba3a5f5b7ee63f9d90ff13b/src/raygui.h#L2562C21-L2562C113

you are just comparing the variable i with the text length or cursor when you really need to >= cursor+codepointsize and <= length-codepointsize

electrolys avatar Apr 23 '24 23:04 electrolys

@electrolys Good catch! Please, could you send a PR with the fix! Thanks!

raysan5 avatar May 05 '24 09:05 raysan5

It seems there is no interest in this fix...

raysan5 avatar Sep 24 '24 17:09 raysan5