1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 11:44:17 +01:00

Fix: Validate raw strings from game-scripts, and strip invalid and control characters. (#13976)

This commit is contained in:
frosch
2025-04-07 19:30:36 +02:00
committed by GitHub
parent 2cdf2bedfa
commit 3f2b58d6e1
2 changed files with 3 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ EncodedString GetEncodedStringWithArgs(StringID str, std::span<const StringParam
char32_t c;
const char *p = value.data();
if (Utf8Decode(&c, p)) {
assert(c != SCC_ENCODED && c != SCC_ENCODED_INTERNAL);
assert(c != SCC_ENCODED && c != SCC_ENCODED_INTERNAL && c != SCC_RECORD_SEPARATOR);
}
}
#endif /* WITH_ASSERT */