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

GRF integer parameters can be given negative values. #57

Closed
spnda opened this issue Nov 16, 2019 · 3 comments
Closed

GRF integer parameters can be given negative values. #57

spnda opened this issue Nov 16, 2019 · 3 comments

Comments

@spnda
Copy link
Contributor

@spnda spnda commented Nov 16, 2019

When giving a grf parameter a negative value, the compiler doesn't complain. Though OpenTTD has an assertion check to see if the values of the dropdown are positive.

Example:

min_value: -1;
max_value: 1;
def_value: 0;

Image of Yaktocat

A zip containing the .grf and the .nml file.
grf.zip

Not sure, but maybe this is a OpenTTD related issue. This issue exists in various versions of OpenTTD, aswell as in JGR.

@LordAro
Copy link
Member

@LordAro LordAro commented Nov 16, 2019

Definitely an OpenTTD issue, should not be able to crash the game like that :p

@spnda
Copy link
Contributor Author

@spnda spnda commented Nov 16, 2019

Hmm true. Should this maybe be reopened as a issue on OpenTTD/OpenTTD?

@spnda spnda closed this Nov 16, 2019
@LordAro
Copy link
Member

@LordAro LordAro commented Nov 16, 2019

It should, but I'd say it's a valid issue that nml allows it as well

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.