diff --git a/Source/Core/DiscIO/Volume.h b/Source/Core/DiscIO/Volume.h index 3d161811e4..32f8e8d71f 100644 --- a/Source/Core/DiscIO/Volume.h +++ b/Source/Core/DiscIO/Volume.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -143,16 +144,15 @@ public: virtual std::array GetSyncHash() const = 0; protected: - template - std::string DecodeString(const char (&data)[N]) const + std::string DecodeString(std::span data) const { // strnlen to trim NULLs - std::string string(data, strnlen(data, sizeof(data))); + std::string string(data.data(), strnlen(data.data(), data.size())); if (GetRegion() == Region::NTSC_J) return SHIFTJISToUTF8(string); - else - return CP1252ToUTF8(string); + + return CP1252ToUTF8(string); } void ReadAndAddToSyncHash(Common::SHA1::Context* context, u64 offset, u64 length,