diff --git a/app/src/main/cpp/skyline/common/address_space.h b/app/src/main/cpp/skyline/common/address_space.h index 2a70ab34..c7f34d16 100644 --- a/app/src/main/cpp/skyline/common/address_space.h +++ b/app/src/main/cpp/skyline/common/address_space.h @@ -156,7 +156,7 @@ namespace skyline { auto [blockSpan, rangeOffset]{LookupBlockLocked(virt, cpuAccessCallback)}; if (blockSpan.size() - rangeOffset >= size) { TranslatedAddressRange ranges; - ranges.push_back(blockSpan.subspan(rangeOffset, size)); + ranges.push_back(blockSpan.subspan(blockSpan.valid() ? rangeOffset : 0, size)); return ranges; }