mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
Fixed GlobalSize return value for zero size block.
This commit is contained in:
parent
3dbc7881ea
commit
3db8e19d22
@ -1370,6 +1370,8 @@ DWORD WINAPI GlobalSize32(
|
||||
|
||||
if(pintern->Magic==MAGIC_GLOBAL_USED)
|
||||
{
|
||||
if (!pintern->Pointer) /* handle case of GlobalAlloc( ??,0) */
|
||||
return 0;
|
||||
retval=HeapSize(GetProcessHeap(), 0,
|
||||
(char *)(pintern->Pointer)-sizeof(HGLOBAL32))-4;
|
||||
}
|
||||
@ -1380,6 +1382,8 @@ DWORD WINAPI GlobalSize32(
|
||||
}
|
||||
/* HeapUnlock(GetProcessHeap()); */
|
||||
}
|
||||
/* HeapSize returns 0xffffffff on failure */
|
||||
if (retval == 0xffffffff) retval = 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -1204,7 +1204,7 @@ BOOL32 WINAPI HeapUnlock(
|
||||
* HeapSize (KERNEL32.341)
|
||||
* RETURNS
|
||||
* Size in bytes of allocated memory
|
||||
* 0: Failure
|
||||
* 0xffffffff: Failure
|
||||
*/
|
||||
DWORD WINAPI HeapSize(
|
||||
HANDLE32 heap, /* [in] Handle of heap */
|
||||
|
Loading…
Reference in New Issue
Block a user