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

std.mem.span used on strings that may be null? #180

Open
kaizoplant opened this issue Dec 13, 2024 · 0 comments
Open

std.mem.span used on strings that may be null? #180

kaizoplant opened this issue Dec 13, 2024 · 0 comments

Comments

@kaizoplant
Copy link

In the bindings, std.mem.span is used on functions that may be null for non-program ruining reasons, which ends up crashing the program without any way to intervene? In my case it was rl.getClipboardText (in this case when the clipboard is empty this happens (at least using wl-clipboard)), I'm not familiar enough with raylib to know all the other functions that would also have something like this, but there might be others? This is similar to #118, I do think in this case, just returning an optional is reasonable, although I'm not exactly sure how you'd want to go about it for auto-generated bindings.

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

1 participant