mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-28 12:30:17 +00:00
fs.mitm: fix infinite loop due to off-by-one in romfs read comparison
This commit is contained in:
parent
a7e89c6dbb
commit
3c7ece2f8b
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ namespace ams::mitm::fs {
|
|||
const auto &cur_source = *it;
|
||||
AMS_ASSERT(offset >= cur_source.virtual_offset);
|
||||
|
||||
if (offset <= cur_source.virtual_offset + cur_source.size) {
|
||||
if (offset < cur_source.virtual_offset + cur_source.size) {
|
||||
const s64 offset_within_source = offset - cur_source.virtual_offset;
|
||||
const size_t cur_read_size = std::min(size - read_so_far, size_t(cur_source.size - offset_within_source));
|
||||
switch (cur_source.source_type) {
|
||||
|
|
Loading…
Reference in a new issue