-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Set undefined memory in debug mode don't work #20859
Comments
Please give a complete example that reproduces the issue. |
The raylib part is useless for this kind of problem, but if you want i followed the instruction of "https://github.com/Not-Nik/raylib-zig" to install it. I've found another kind of strange behaviour, the commented lines below max_col and min_col are a workaround to make the program works in debug mode, BUT in ReleaseSafe mode it doesn't work anymore, and i think this is even more strange |
Comparison against undefined is always a bug. I suggest you read the documentation for You probably want to use optionals instead: Related issues:
In the future, please direct questions like this to one of the community spaces first |
Thank you for your time, i'm sorry for open this dumb issue. Next time i'll ask on other channels |
Zig Version
0.14.0-dev.655+d30d37e35
Steps to Reproduce and Observed Behavior
I have "var min_col: i32 = undefined;", when i try to set the variable to some value (the first value is always setted, then i use it to find a minimum) it doesn't work in Debug mode. I tried in ReleaseSafe and it all works correctly
Expected Behavior
To behave like in Release mode, and set the memory to a value
The text was updated successfully, but these errors were encountered: