Fix block insertion

The subtraction was the wrong way round causing an underflow.
This commit is contained in:
Billy Laws 2020-07-06 19:06:12 +01:00 committed by ◱ PixelyIon
parent 1383e17341
commit c708c353e3

View File

@ -107,7 +107,7 @@ namespace skyline::kernel {
endBlock.address = (block.address + block.size);
endBlock.size = (iter->address + iter->size) - endBlock.address;
iter->size = iter->address - block.address;
iter->size = block.address - iter->address;
chunk->blockList.insert(std::next(iter), {block, endBlock});
}
return;