diff options
| author | Anthony <Helios747@users.noreply.github.com> | 2017-03-18 23:30:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-18 23:30:27 -0700 |
| commit | 9604a069210256742e70508e9caa2710af537e8d (patch) | |
| tree | b1e08d4cd62cfd7c816742960c8eed1a45089e09 /Source/Core/DiscIO/VolumeWad.cpp | |
| parent | cb87b25ac626d8340747d67415c39f6f551a0b74 (diff) | |
| parent | c987f58319be3de0cd392e757c4ff375162c196a (diff) | |
Merge pull request #5102 from leoetlino/channel-title-type
Check whether WAD is a channel before reading names
Diffstat (limited to 'Source/Core/DiscIO/VolumeWad.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWad.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index 79e5423d54..a06c7483e8 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -130,6 +130,9 @@ Platform CVolumeWAD::GetVolumeType() const std::map<Language, std::string> CVolumeWAD::GetLongNames() const { + if (!m_tmd.IsValid() || !IOS::ES::IsChannel(m_tmd.GetTitleId())) + return {}; + std::vector<u8> name_data(NAMES_TOTAL_BYTES); if (!Read(m_opening_bnr_offset + 0x9C, NAMES_TOTAL_BYTES, name_data.data())) return std::map<Language, std::string>(); |
