Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
4b12e9c5
Commit
4b12e9c5
authored
Jun 13, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix some 64-bit issues in GlobalSize().
parent
fed025fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
heap.c
dlls/kernel32/heap.c
+7
-9
No files found.
dlls/kernel32/heap.c
View file @
4b12e9c5
...
...
@@ -808,7 +808,7 @@ HGLOBAL WINAPI GlobalFree(HGLOBAL hmem)
*/
SIZE_T
WINAPI
GlobalSize
(
HGLOBAL
hmem
)
{
DWORD
retval
;
SIZE_T
retval
;
PGLOBAL32_INTERN
pintern
;
if
(
!
((
ULONG_PTR
)
hmem
>>
16
))
...
...
@@ -821,10 +821,10 @@ SIZE_T WINAPI GlobalSize(HGLOBAL hmem)
{
retval
=
HeapSize
(
GetProcessHeap
(),
0
,
hmem
);
if
(
retval
==
(
DWORD
)
-
1
)
/* It might be a GMEM_MOVEABLE data pointer */
if
(
retval
==
~
0ul
)
/* It might be a GMEM_MOVEABLE data pointer */
{
retval
=
HeapSize
(
GetProcessHeap
(),
0
,
(
char
*
)
(
hmem
)
-
HGLOBAL_STORAGE
);
if
(
retval
!=
(
DWORD
)
-
1
)
retval
-=
HGLOBAL_STORAGE
;
retval
=
HeapSize
(
GetProcessHeap
(),
0
,
(
char
*
)
hmem
-
HGLOBAL_STORAGE
);
if
(
retval
!=
~
0ul
)
retval
-=
HGLOBAL_STORAGE
;
}
}
else
...
...
@@ -838,9 +838,8 @@ SIZE_T WINAPI GlobalSize(HGLOBAL hmem)
retval
=
0
;
else
{
retval
=
HeapSize
(
GetProcessHeap
(),
0
,
(
char
*
)(
pintern
->
Pointer
)
-
HGLOBAL_STORAGE
);
if
(
retval
!=
(
DWORD
)
-
1
)
retval
-=
HGLOBAL_STORAGE
;
retval
=
HeapSize
(
GetProcessHeap
(),
0
,
(
char
*
)
pintern
->
Pointer
-
HGLOBAL_STORAGE
);
if
(
retval
!=
~
0ul
)
retval
-=
HGLOBAL_STORAGE
;
}
}
else
...
...
@@ -851,8 +850,7 @@ SIZE_T WINAPI GlobalSize(HGLOBAL hmem)
}
RtlUnlockHeap
(
GetProcessHeap
());
}
/* HeapSize returns 0xffffffff on failure */
if
(
retval
==
0xffffffff
)
retval
=
0
;
if
(
retval
==
~
0ul
)
retval
=
0
;
return
retval
;
}
...
...
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