Ensure unmapped VMM ranges return an invalid span

This commit is contained in:
Billy Laws 2023-01-08 21:05:54 +00:00
parent 0a608fb4b2
commit 262f92900d

View File

@ -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;
}