Skip to content

Fix #354: Improve length check for string literal properties#355

Merged
glx22 merged 1 commit intoOpenTTD:masterfrom
glx22:fix_354
Jan 6, 2025
Merged

Fix #354: Improve length check for string literal properties#355
glx22 merged 1 commit intoOpenTTD:masterfrom
glx22:fix_354

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