mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
This commit is contained in:
parent
883d3e7a9f
commit
2976a46d06
@ -274,7 +274,8 @@ public:
|
||||
char *string = reinterpret_cast<char *>(data);
|
||||
size_t string_length = ttd_strnlen(string, Remaining());
|
||||
|
||||
Skip(string_length);
|
||||
/* Skip past the terminating NUL byte if it is present, but not more than remaining. */
|
||||
Skip(std::min(string_length + 1, Remaining()));
|
||||
|
||||
return std::string_view(string, string_length);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user