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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user