[FAST486]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Tue, 26 Nov 2013 17:55:07 +0000 (17:55 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Tue, 26 Nov 2013 17:55:07 +0000 (17:55 +0000)
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

index 389c872..6fb0398 100644 (file)
@@ -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 */