Commit 582cf8f6 authored by Thuy Nguyen's avatar Thuy Nguyen Committed by Alexandre Julliard

Fixed a bug.

parent 6d2e1735
......@@ -621,6 +621,7 @@ static void * BIGBLOCKFILE_GetMappedView(
MappedPage * current;
MappedPage * newMappedPage;
DWORD hioffset, lowoffset;
DWORD numBytesToMap;
/* use correct list
*/
......@@ -660,22 +661,16 @@ static void * BIGBLOCKFILE_GetMappedView(
/* actually map the page
*/
if (This->filesize.LowPart <= PAGE_SIZE)
{
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset, lowoffset,
This->filesize.LowPart);
}
if (((pagenum + 1) * PAGE_SIZE) > This->filesize.LowPart)
numBytesToMap = This->filesize.LowPart - (pagenum * PAGE_SIZE);
else
{
DWORD numBytesToMap = This->filesize.LowPart - (pagenum*PAGE_SIZE);
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset,
lowoffset,
numBytesToMap);
}
numBytesToMap = PAGE_SIZE;
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset,
lowoffset,
numBytesToMap);
return newMappedPage->lpBytes;
}
......@@ -704,23 +699,16 @@ static void * BIGBLOCKFILE_GetMappedView(
/* actually map the page
*/
if (This->filesize.LowPart <= PAGE_SIZE)
{
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset,
lowoffset,
This->filesize.LowPart);
}
if (((pagenum + 1) * PAGE_SIZE) > This->filesize.LowPart)
numBytesToMap = This->filesize.LowPart - (pagenum * PAGE_SIZE);
else
{
DWORD numBytesToMap = This->filesize.LowPart - (pagenum*PAGE_SIZE);
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset,
lowoffset,
numBytesToMap);
}
numBytesToMap = PAGE_SIZE;
newMappedPage->lpBytes = MapViewOfFile(This->hfilemap,
desired_access,
hioffset,
lowoffset,
numBytesToMap);
return newMappedPage->lpBytes;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment