From 8171c7766cd39617d55f4c638f63e08715b260cb Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 17 Feb 2022 00:23:28 +0100 Subject: [PATCH] cellSearch: silence irrelevant log error --- rpcs3/Emu/Cell/Modules/cellSearch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSearch.cpp b/rpcs3/Emu/Cell/Modules/cellSearch.cpp index 465acbfd66..45bc317929 100644 --- a/rpcs3/Emu/Cell/Modules/cellSearch.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSearch.cpp @@ -199,9 +199,12 @@ void populate_music_info(CellSearchMusicInfo& info, const utils::media_info& mi, // Special case: track is usually stored as e.g. 2/11 const std::string tmp = mi.get_metadata("track", ""s); s64 value{}; - const bool success = try_to_int64(&value, tmp.substr(0, tmp.find('/')).c_str(), s32{smin}, s32{smax}); - info.trackNumber = success ? static_cast(value) : -1; + if (tmp.empty() || !try_to_int64(&value, tmp.substr(0, tmp.find('/')).c_str(), s32{smin}, s32{smax})) + { + value = -1; + } + info.trackNumber = static_cast(value); info.size = item.size; info.releasedYear = static_cast(mi.get_metadata("date", -1)); info.duration = mi.duration_us / 1000; // we need microseconds