diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index 778c044514..063460d4d2 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -960,7 +960,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_FILENAME_TEXTBOX: { - std::string tempText = text.data(); + std::string tempText{ text }; const char* cStr = tempText.c_str(); if (strcmp(_currentFilename, cStr) == 0) return;