2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #2708 from DarkLordZach/mii-db-source-crash

mii: Handle logging of unknown database source
This commit is contained in:
David 2019-09-04 13:07:10 +10:00 committed by GitHub
commit e1981b8b8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -175,6 +175,10 @@ MiiStoreData ConvertInfoToStoreData(const MiiInfo& info) {
} // namespace } // namespace
std::ostream& operator<<(std::ostream& os, Source source) { std::ostream& operator<<(std::ostream& os, Source source) {
if (static_cast<std::size_t>(source) >= SOURCE_NAMES.size()) {
return os << "[UNKNOWN SOURCE]";
}
os << SOURCE_NAMES.at(static_cast<std::size_t>(source)); os << SOURCE_NAMES.at(static_cast<std::size_t>(source));
return os; return os;
} }