diff options
| author | Markus Wick <markus@selfnet.de> | 2015-06-18 14:57:10 +0200 |
|---|---|---|
| committer | Markus Wick <markus@selfnet.de> | 2015-06-18 14:57:10 +0200 |
| commit | 156fb82117bfb42860a99828254a52ce6f14fd1c (patch) | |
| tree | 70e08cf5edd45329fa39c3fdeff1bfe5b6410b46 /Source/Core/DiscIO/VolumeGC.cpp | |
| parent | 3df28a4ea0670494c853cd64289046c415e3e87b (diff) | |
| parent | a825c7ddfea49eefd9c9774ba6545a4292812221 (diff) | |
Merge pull request #2620 from JosJuice/more-decodestring
Volume: Use DecodeString more
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeGC.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 6160c65b24..f2e54bdde8 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -47,7 +47,7 @@ std::string CVolumeGC::GetUniqueID() const if (m_pReader == nullptr) return NO_UID; - char ID[7]; + char ID[6]; if (!Read(0, sizeof(ID), reinterpret_cast<u8*>(ID))) { @@ -55,9 +55,7 @@ std::string CVolumeGC::GetUniqueID() const return NO_UID; } - ID[6] = '\0'; - - return ID; + return DecodeString(ID); } IVolume::ECountry CVolumeGC::GetCountry() const @@ -76,12 +74,11 @@ std::string CVolumeGC::GetMakerID() const if (m_pReader == nullptr) return std::string(); - char makerID[3]; + char makerID[2]; if (!Read(0x4, 0x2, (u8*)&makerID)) return std::string(); - makerID[2] = '\0'; - return makerID; + return DecodeString(makerID); } u16 CVolumeGC::GetRevision() const @@ -166,10 +163,8 @@ std::string CVolumeGC::GetApploaderDate() const char date[16]; if (!Read(0x2440, 0x10, (u8*)&date)) return std::string(); - // Should be 0 already, but just in case - date[10] = '\0'; - return date; + return DecodeString(date); } u64 CVolumeGC::GetSize() const |
