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/VolumeWad.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/VolumeWad.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWad.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index 9821e93862..a86c944844 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -70,29 +70,25 @@ IVolume::ECountry CVolumeWAD::GetCountry() const std::string CVolumeWAD::GetUniqueID() const { - std::string temp = GetMakerID(); - - char GameCode[8]; + char GameCode[6]; if (!Read(m_offset + 0x01E0, 4, (u8*)GameCode)) return "0"; + std::string temp = GetMakerID(); GameCode[4] = temp.at(0); GameCode[5] = temp.at(1); - GameCode[6] = 0; - return GameCode; + return DecodeString(GameCode); } std::string CVolumeWAD::GetMakerID() const { - char temp[3] = {1}; + char temp[2] = {1}; // Some weird channels use 0x0000 in place of the MakerID, so we need a check there if (!Read(0x198 + m_tmd_offset, 2, (u8*)temp) || temp[0] == 0 || temp[1] == 0) return "00"; - temp[2] = 0; - - return temp; + return DecodeString(temp); } bool CVolumeWAD::GetTitleID(u8* _pBuffer) const |
