Fix the order of operations.
svn path=/branches/ntvdm/; revision=61106
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 */
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 */