Fix improper VMM error check in unmap

This commit is contained in:
Billy Laws 2021-10-01 20:58:22 +01:00
parent 4eff515c55
commit 7a5ca19c0b

View File

@ -140,7 +140,7 @@ namespace skyline {
}()};
// We can't have two unmapped regions after each other
if (eraseEnd == blockStartSuccessor || (blockStartPredecessor->Unmapped() && eraseEnd->Unmapped()))
if (eraseEnd != blocks.end() && (eraseEnd == blockStartSuccessor || (blockStartPredecessor->Unmapped() && eraseEnd->Unmapped())))
throw exception("Multiple contiguous unmapped regions are unsupported!");
blocks.erase(blockStartSuccessor, eraseEnd);