fix: out-of-border access

This commit is contained in:
Nik Chizhov 2024-07-06 23:42:31 +09:00 committed by Connor McLaughlin
parent d372609bdc
commit e4470a9929

View file

@ -161,7 +161,7 @@ bool CDImageM3u::SwitchSubImage(u32 index, Error* error)
std::string CDImageM3u::GetSubImageMetadata(u32 index, std::string_view type) const std::string CDImageM3u::GetSubImageMetadata(u32 index, std::string_view type) const
{ {
if (index > m_entries.size()) if (index >= m_entries.size())
return {}; return {};
if (type == "title") if (type == "title")