Fix off-by-one/buffer over-read error in StrMakeValid
See: https://github.com/OpenTTD/OpenTTD/issues/11644
This commit is contained in:
@@ -290,7 +290,7 @@ void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir,
|
||||
if (!quoted && e == t) {
|
||||
item.value.reset();
|
||||
} else {
|
||||
item.value = StrMakeValid(std::string(t));
|
||||
item.value = StrMakeValid(std::string_view(t));
|
||||
}
|
||||
} else {
|
||||
/* it's an orphan item */
|
||||
|
Reference in New Issue
Block a user