diff options
author | Lioncash <mathew1800@gmail.com> | 2020-09-22 23:31:53 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-09-22 23:32:33 +0200 |
commit | ff45c3957858cdf189b73e11550da06fe4337b8e (patch) | |
tree | 288ff1cc4677d6511ed8cc7e1b0db20ce2d2590f /src/core/file_sys/vfs.cpp | |
parent | Merge pull request #4697 from lioncash/copy5 (diff) | |
download | yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.gz yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.bz2 yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.lz yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.xz yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.tar.zst yuzu-ff45c3957858cdf189b73e11550da06fe4337b8e.zip |
Diffstat (limited to 'src/core/file_sys/vfs.cpp')
-rw-r--r-- | src/core/file_sys/vfs.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs.cpp b/src/core/file_sys/vfs.cpp index a4c3f67c4..b2f026b6d 100644 --- a/src/core/file_sys/vfs.cpp +++ b/src/core/file_sys/vfs.cpp @@ -169,11 +169,12 @@ VfsDirectory::~VfsDirectory() = default; std::optional<u8> VfsFile::ReadByte(std::size_t offset) const { u8 out{}; - std::size_t size = Read(&out, 1, offset); - if (size == 1) + const std::size_t size = Read(&out, sizeof(u8), offset); + if (size == 1) { return out; + } - return {}; + return std::nullopt; } std::vector<u8> VfsFile::ReadBytes(std::size_t size, std::size_t offset) const { |