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

Fix #7836: check coherency of newgrf parameter min/max #7840

Merged
merged 2 commits into from Nov 23, 2019

Conversation

@glx22
Copy link
Contributor

glx22 commented Nov 18, 2019

No description provided.

src/newgrf_config.cpp Outdated Show resolved Hide resolved
@glx22
Copy link
Contributor Author

glx22 commented Nov 19, 2019

Checking the values earlier (and ignoring incoherent ones) seems better for me.

@glx22
Copy link
Contributor Author

glx22 commented Nov 19, 2019

BTW I noticed it's not possible to enter values > 999 999 999 in the GUI. I tried increasing max_len in ShowQueryString() call, but it's still not possible to go above 2 147 483 647 because atoi() is used for the conversion.

Copy link
Member

LordAro left a comment

Entering high numbers is probably a separate issue, crash is more important

@LordAro LordAro merged commit d865916 into OpenTTD:master Nov 23, 2019
8 checks passed
8 checks passed
OpenTTD CI Build #20191119.1 succeeded
Details
OpenTTD CI (Linux commit-checker) Linux commit-checker succeeded
Details
OpenTTD CI (Linux linux-amd64-clang-3.9) Linux linux-amd64-clang-3.9 succeeded
Details
OpenTTD CI (Linux linux-amd64-gcc-6) Linux linux-amd64-gcc-6 succeeded
Details
OpenTTD CI (Linux linux-i386-gcc-6) Linux linux-i386-gcc-6 succeeded
Details
OpenTTD CI (MacOS) MacOS succeeded
Details
OpenTTD CI (Windows Win32) Windows Win32 succeeded
Details
OpenTTD CI (Windows Win64) Windows Win64 succeeded
Details
@glx22 glx22 deleted the glx22:fix_7836 branch Nov 24, 2019
douiwby added a commit to douiwby/OpenTTD that referenced this pull request Apr 16, 2020
spnda added a commit to spnda/OpenTTD that referenced this pull request Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.