1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-18 09:52:44 +01:00

Codechange: Remove broken and unused StrMakeValidInPlace overload. (#13960)

If an otherwise valid string without NUL termination was passed, a NUL was appended out of bounds.
This commit is contained in:
frosch
2025-04-04 11:48:32 +02:00
committed by GitHub
parent 1befa1ccb0
commit 44984f8410
3 changed files with 5 additions and 25 deletions

View File

@@ -21,7 +21,6 @@ void strecpy(std::span<char> dst, std::string_view src);
std::string FormatArrayAsHex(std::span<const uint8_t> data);
void StrMakeValidInPlace(char *str, const char *last, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK) NOACCESS(2);
[[nodiscard]] std::string StrMakeValid(std::string_view str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void StrMakeValidInPlace(char *str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);