Skip to content
Permalink
Browse files
Merge pull request #8619 from JosJuice/directoryblob-check-seek
DiscIO: Check for DirectoryBlob seek failure
  • Loading branch information
leoetlino committed Feb 9, 2020
2 parents fb0f543 + 9a348ae commit 166e86b
Showing 1 changed file with 1 addition and 2 deletions.
@@ -104,8 +104,7 @@ bool DiscContent::Read(u64* offset, u64* length, u8** buffer) const
if (std::holds_alternative<std::string>(m_content_source))
{
File::IOFile file(std::get<std::string>(m_content_source), "rb");
file.Seek(offset_in_content, SEEK_SET);
if (!file.ReadBytes(*buffer, bytes_to_read))
if (!file.Seek(offset_in_content, SEEK_SET) || !file.ReadBytes(*buffer, bytes_to_read))
return false;
}
else

0 comments on commit 166e86b

Please sign in to comment.