mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 19:26:16 +00:00
[FAST486]
Fix the calculation of PageLength for the last page. svn path=/branches/ntvdm/; revision=61275
This commit is contained in:
@@ -160,7 +160,7 @@ Fast486ReadLinearMemory(PFAST486_STATE State,
|
||||
if (Page == PAGE_ALIGN(LinearAddress + Size - 1))
|
||||
{
|
||||
/* Read only a part of the page */
|
||||
PageLength = PAGE_OFFSET(LinearAddress) + Size - PageOffset;
|
||||
PageLength = PAGE_OFFSET(LinearAddress + Size - 1) - PageOffset + 1;
|
||||
}
|
||||
|
||||
/* Read the memory */
|
||||
@@ -228,7 +228,7 @@ Fast486WriteLinearMemory(PFAST486_STATE State,
|
||||
if (Page == PAGE_ALIGN(LinearAddress + Size - 1))
|
||||
{
|
||||
/* Write only a part of the page */
|
||||
PageLength = PAGE_OFFSET(LinearAddress) + Size - PageOffset;
|
||||
PageLength = PAGE_OFFSET(LinearAddress + Size - 1) - PageOffset + 1;
|
||||
}
|
||||
|
||||
/* Write the memory */
|
||||
|
||||
Reference in New Issue
Block a user