diff --git a/Core/Util/BlockAllocator.cpp b/Core/Util/BlockAllocator.cpp index 34bf5ee618..1b67b82a9a 100644 --- a/Core/Util/BlockAllocator.cpp +++ b/Core/Util/BlockAllocator.cpp @@ -169,7 +169,7 @@ u32 BlockAllocator::AllocAt(u32 position, u32 size, const char *tag) // Upalign size to grain. alignedSize = (alignedSize + grain_ - 1) & ~(grain_ - 1); // Tell the caller the allocated size from their requested starting position. - size = alignedSize - (alignedPosition - position); + size = alignedSize - (position - alignedPosition); Block *bp = GetBlockFromAddress(alignedPosition); if (bp != NULL)