summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/vfs_static.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys/vfs_static.h')
-rw-r--r--src/core/file_sys/vfs_static.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/file_sys/vfs_static.h b/src/core/file_sys/vfs_static.h
index 9f5a90b1b..8b27c30fa 100644
--- a/src/core/file_sys/vfs_static.h
+++ b/src/core/file_sys/vfs_static.h
@@ -54,9 +54,11 @@ public:
}
std::optional<u8> ReadByte(std::size_t offset) const override {
- if (offset < size)
- return value;
- return {};
+ if (offset >= size) {
+ return std::nullopt;
+ }
+
+ return value;
}
std::vector<u8> ReadBytes(std::size_t length, std::size_t offset) const override {