From f45361126feaf2680b10776c0c8e16614afceb47 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Tue, 26 Nov 2013 17:55:07 +0000 Subject: [PATCH] [FAST486] Handle the case when the last page is also the first page in Fast486ReadLinearMemory ( when paging is enabled). svn path=/branches/ntvdm/; revision=61104 --- lib/fast486/common.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fast486/common.inl b/lib/fast486/common.inl index 389c872828b..6fb0398e3dd 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); + PageLength = PAGE_OFFSET(LinearAddress + Size) - PageOffset; } /* Read the memory */