From 37a352e9d33f6f8bd85a9f3839bb7b54bb6363fa Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Wed, 10 Jul 2019 07:07:24 -0400 Subject: [PATCH] mii: Handle logging of unknown database source --- src/core/hle/service/mii/mii_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/hle/service/mii/mii_manager.cpp b/src/core/hle/service/mii/mii_manager.cpp index 131b01d627..8d0353075c 100644 --- a/src/core/hle/service/mii/mii_manager.cpp +++ b/src/core/hle/service/mii/mii_manager.cpp @@ -175,6 +175,10 @@ MiiStoreData ConvertInfoToStoreData(const MiiInfo& info) { } // namespace std::ostream& operator<<(std::ostream& os, Source source) { + if (static_cast(source) >= SOURCE_NAMES.size()) { + return os << "[UNKNOWN SOURCE]"; + } + os << SOURCE_NAMES.at(static_cast(source)); return os; }