Ignore:
Timestamp:
Aug 26, 1999, 7:56:26 PM (26 years ago)
Author:
sandervl
Message:

Workaround for OS/2 bug + VirtualProtect/VirtualQuery bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/virtual.cpp

    r707 r708  
    1 /* $Id: virtual.cpp,v 1.9 1999-08-26 15:05:14 sandervl Exp $ */
     1/* $Id: virtual.cpp,v 1.10 1999-08-26 17:56:26 sandervl Exp $ */
    22
    33/*
     
    433433        return(TRUE);   //nothing to do
    434434  }
    435   npages = ((int)lpvAddress + cbSize >> 12) - ((int)lpvAddress >> 12) + 1;
     435  ULONG offset = ((ULONG)lpvAddress & 0xFFF);
     436  npages = (cbSize >> 12);
     437  if(cbSize & 0xFFF + offset) {
     438        npages++;
     439  }
    436440
    437441  lpvAddress = (LPVOID)((int)lpvAddress & ~0xFFF);
Note: See TracChangeset for help on using the changeset viewer.