Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
582cf8f6
Commit
582cf8f6
authored
Feb 24, 1999
by
Thuy Nguyen
Committed by
Alexandre Julliard
Feb 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug.
parent
6d2e1735
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
31 deletions
+19
-31
stg_bigblockfile.c
ole/stg_bigblockfile.c
+19
-31
No files found.
ole/stg_bigblockfile.c
View file @
582cf8f6
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment