mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-22 20:06:40 +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