Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raygui.text_box appends unwanted '0' bytes to result #46

Open
kevinclancy opened this issue Oct 17, 2024 · 2 comments
Open

Raygui.text_box appends unwanted '0' bytes to result #46

kevinclancy opened this issue Oct 17, 2024 · 2 comments

Comments

@kevinclancy
Copy link

When I call Raygui.text_box bounds text edit_mode the result will append the byte 0 onto text even if no key has been pressed. I can work around this by trimming 0's off the result.

Also, the doc comment suggests there is is a text_size argument, which text_box doesn't actually have.

@tjammer
Copy link
Owner

tjammer commented Oct 18, 2024

It's even worse than you say, a null byte is added on each frame and the string length grows and grows. Ouch!

The doc comments were copied from raylib, which has the extra text_size parameter.

@tjammer tjammer reopened this Oct 18, 2024
@tjammer
Copy link
Owner

tjammer commented Oct 18, 2024

The fix is on master now. I'll leave the issue open until I pushed a new release to the opam repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants