From d358641f7cdd6df5a8c97d38eeaa461a744d260b Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Tue, 26 Nov 2013 18:11:53 +0000 Subject: [PATCH] [FAST486] Fix the order of operations. svn path=/branches/ntvdm/; revision=61106 --- lib/fast486/common.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fast486/common.inl b/lib/fast486/common.inl index 895487ca646..57b2df7ef87 100644 --- a/lib/fast486/common.inl +++ b/lib/fast486/common.inl @@ -159,7 +159,7 @@ Fast486ReadLinearMemory(PFAST486_STATE State, if (Page == PAGE_ALIGN(LinearAddress + Size - 1)) { /* Copy only a part of the page */ - PageLength = PAGE_OFFSET(LinearAddress + Size) - PageOffset; + PageLength = PAGE_OFFSET(LinearAddress) + Size - PageOffset; } /* Read the memory */ @@ -224,7 +224,7 @@ Fast486WriteLinearMemory(PFAST486_STATE State, if (Page == PAGE_ALIGN(LinearAddress + Size - 1)) { /* Copy only a part of the page */ - PageLength = PAGE_OFFSET(LinearAddress + Size) - PageOffset; + PageLength = PAGE_OFFSET(LinearAddress) + Size - PageOffset; } /* Write the memory */ -- 2.17.1