1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Codefix: std::string_view::data() is not necessarily null terminated. (#13891)

This commit is contained in:
frosch
2025-03-25 20:32:19 +01:00
committed by GitHub
parent 93016b9a92
commit 25005cff16
7 changed files with 10 additions and 9 deletions

View File

@@ -494,7 +494,7 @@ static INT_PTR CALLBACK CrashDialogFunc(HWND wnd, UINT msg, WPARAM wParam, LPARA
char *crashlog_dos_nl = reinterpret_cast<char *>(filename_buf + filename_buf_length * filename_count);
/* Convert unix -> dos newlines because the edit box only supports that properly. */
const char *crashlog_unix_nl = crashlog.data();
const char *crashlog_unix_nl = crashlog.c_str();
char *p = crashlog_dos_nl;
char32_t c;
while ((c = Utf8Consume(&crashlog_unix_nl))) {