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 #354: Improve length check for string literal properties #355

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

glx22
Copy link
Contributor

@glx22 glx22 commented Jan 6, 2025

Length check for string literal properties is dumb, it uses len() so len('NML_') is 4 and len('\FFNML') is 6.

Use grfstrings.get_string_size() so the length checks are done on actual length in bytes.

@glx22 glx22 merged commit f97de8b into OpenTTD:master Jan 6, 2025
21 checks passed
@glx22 glx22 deleted the fix_354 branch January 6, 2025 22:08
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

Successfully merging this pull request may close these issues.

2 participants