- Enlarge window name buffer.
authorDmitry Gorbachev <gorbachev@reactos.org>
Sat, 28 Apr 2007 04:09:56 +0000 (04:09 +0000)
committerDmitry Gorbachev <gorbachev@reactos.org>
Sat, 28 Apr 2007 04:09:56 +0000 (04:09 +0000)
- Do not free Menu Item Info many times.
- Remove r26508 hack.

svn path=/trunk/; revision=26552

reactos/dll/win32/user32/windows/bitmap.c
reactos/dll/win32/user32/windows/dialog.c
reactos/dll/win32/user32/windows/menu.c

index b9016a7..3124929 100644 (file)
@@ -735,7 +735,7 @@ CopyImage(
 
                     /* Fill in biSizeImage */
                     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)
                     {
index e1be982..0c7dd30 100644 (file)
@@ -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? */
     {
-        info->windowName = HeapAlloc( GetProcessHeap(), 0, 10 );
+        info->windowName = HeapAlloc( GetProcessHeap(), 0, sizeof(L"#65535") );
         swprintf((LPWSTR)info->windowName, L"#%d", GET_WORD(p + 1));
         info->windowNameFree = TRUE;
         p += 2;
index 0a803b7..4eab325 100644 (file)
@@ -236,6 +236,7 @@ MenuCleanupRosMenuItemInfo(PROSMENUITEMINFO ItemInfo)
   if (ItemInfo->dwTypeData != NULL)
     {
       HeapFree(GetProcessHeap(), 0, ItemInfo->dwTypeData);
+      ItemInfo->dwTypeData = NULL;
     }
 }