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

Invalid range checking causes unreachable code in runtime.gd #64

Open
belzecue opened this issue Mar 26, 2023 · 1 comment
Open

Invalid range checking causes unreachable code in runtime.gd #64

belzecue opened this issue Mar 26, 2023 · 1 comment

Comments

@belzecue
Copy link

if idx < 0 and idx >= params.size():

This is found in each of the three get_params function in runtime.gd. The dependent code never runs because if idx = -1 (or lower) then it cannot also be >= 0 (or higher).

I believe the line should be:

if idx < 0 or idx >= params.size():

@fian46
Copy link
Owner

fian46 commented Mar 27, 2023

i think you are correct. some code are pretty old and writing in hurry. pull request are welcome ; )

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