From 8c0ffd7230c283e38af318c5f04ab510da0c1c63 Mon Sep 17 00:00:00 2001 From: Ty Lamontagne Date: Wed, 20 Nov 2024 13:10:52 -0500 Subject: [PATCH] QT: Use SetStatusText instead of passing a formatted string as a fmt This caused crashes when file names had percent signs in them because we passed the file name as the format to SetFormattedStatusText. I opted to continue to use fmt for consistency. --- pcsx2/GameList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcsx2/GameList.cpp b/pcsx2/GameList.cpp index 780f963e24..d595d6e57a 100644 --- a/pcsx2/GameList.cpp +++ b/pcsx2/GameList.cpp @@ -623,7 +623,7 @@ void GameList::ScanDirectory(const char* path, bool recursive, bool only_cache, } const std::string_view filename = Path::GetFileName(ffd.FileName); - progress->SetFormattedStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str()); + progress->SetStatusText(fmt::format(TRANSLATE_FS("GameList","Scanning {}..."), filename.data()).c_str()); ScanFile(std::move(ffd.FileName), ffd.ModificationTime, lock, played_time_map, custom_attributes_ini); progress->SetProgressValue(files_scanned); }