mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
- Enlarge window name buffer.
- Do not free Menu Item Info many times. - Remove r26508 hack. svn path=/trunk/; revision=26552
This commit is contained in:
parent
8373c171aa
commit
a29c27d211
3 changed files with 3 additions and 2 deletions
|
@ -735,7 +735,7 @@ CopyImage(
|
||||||
|
|
||||||
/* Fill in biSizeImage */
|
/* Fill in biSizeImage */
|
||||||
GetDIBits(dc, hnd, 0, ds.dsBm.bmHeight, NULL, bi, DIB_RGB_COLORS);
|
GetDIBits(dc, hnd, 0, ds.dsBm.bmHeight, NULL, bi, DIB_RGB_COLORS);
|
||||||
bits = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bi->bmiHeader.biSizeImage * 2); /* HACK */
|
bits = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bi->bmiHeader.biSizeImage);
|
||||||
|
|
||||||
if (bits)
|
if (bits)
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,7 +242,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
|
||||||
|
|
||||||
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
|
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
|
||||||
{
|
{
|
||||||
info->windowName = HeapAlloc( GetProcessHeap(), 0, 10 );
|
info->windowName = HeapAlloc( GetProcessHeap(), 0, sizeof(L"#65535") );
|
||||||
swprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1));
|
swprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1));
|
||||||
info->windowNameFree = TRUE;
|
info->windowNameFree = TRUE;
|
||||||
p += 2;
|
p += 2;
|
||||||
|
|
|
@ -236,6 +236,7 @@ MenuCleanupRosMenuItemInfo(PROSMENUITEMINFO ItemInfo)
|
||||||
if (ItemInfo->dwTypeData != NULL)
|
if (ItemInfo->dwTypeData != NULL)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, ItemInfo->dwTypeData);
|
HeapFree(GetProcessHeap(), 0, ItemInfo->dwTypeData);
|
||||||
|
ItemInfo->dwTypeData = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue