From c708c353e36285932f5f986ac9269b6b33fe70f0 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Mon, 6 Jul 2020 19:06:12 +0100 Subject: [PATCH] Fix block insertion The subtraction was the wrong way round causing an underflow. --- app/src/main/cpp/skyline/kernel/memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/kernel/memory.cpp b/app/src/main/cpp/skyline/kernel/memory.cpp index e33fdc77..d825e5ee 100644 --- a/app/src/main/cpp/skyline/kernel/memory.cpp +++ b/app/src/main/cpp/skyline/kernel/memory.cpp @@ -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;