Fix page alignment

This commit is contained in:
gbeauche 2006-05-14 07:11:23 +00:00
parent 74a5024be4
commit 26a71e5417

View File

@ -346,7 +346,7 @@ static void vosf_do_set_dirty_area(uintptr first, uintptr last)
{
const int first_page = (first - mainBuffer.memStart) >> mainBuffer.pageBits;
const int last_page = (last - mainBuffer.memStart) >> mainBuffer.pageBits;
uint8 *addr = (uint8 *)first;
uint8 *addr = (uint8 *)(first & -mainBuffer.pageSize);
for (int i = first_page; i <= last_page; i++) {
if (PFLAG_ISCLEAR(i)) {
PFLAG_SET(i);