summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/FileSystemGCWii.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-08-23 18:48:24 +0200
committerGitHub <noreply@github.com>2017-08-23 18:48:24 +0200
commitfb2016838e97e32495aef3a6bc925d5e45844923 (patch)
treeeb88546496c9460584b588b7887d86a2f90662b7 /Source/Core/DiscIO/FileSystemGCWii.cpp
parent935c1da35769348d4053eca29c8531e97c510139 (diff)
parent2bcccd893ab2f24baf0a91b92cb8811d53288be4 (diff)
Merge pull request #5864 from JosJuice/directoryblob-disccontentcontainer
DirectoryBlob: Improve ReadInternal
Diffstat (limited to 'Source/Core/DiscIO/FileSystemGCWii.cpp')
-rw-r--r--Source/Core/DiscIO/FileSystemGCWii.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp
index c7cd7115cc..55afc907c9 100644
--- a/Source/Core/DiscIO/FileSystemGCWii.cpp
+++ b/Source/Core/DiscIO/FileSystemGCWii.cpp
@@ -309,7 +309,11 @@ std::unique_ptr<FileInfo> FileSystemGCWii::FindFileInfo(u64 disc_offset) const
{
FileInfoGCWii file_info(m_root, i);
if (!file_info.IsDirectory())
- m_offset_file_info_cache.emplace(file_info.GetOffset() + file_info.GetSize(), i);
+ {
+ const u32 size = file_info.GetSize();
+ if (size != 0)
+ m_offset_file_info_cache.emplace(file_info.GetOffset() + size, i);
+ }
}
}