Skip to content

Commit

Permalink
make it compile again
Browse files Browse the repository at this point in the history
  • Loading branch information
freedom7341 committed Sep 28, 2023
1 parent cbb7373 commit 5e6f59f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions progmgr/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ HWND CreateGroupWindow(GROUP grp)
// Unless... this just works a different way and I don't have to
// keep track of all these stupid little pointers... since I can
// just associate this with the appropriate window.
pGroup = (PGROUP)malloc(sizeof(grp) + sizeof(ITEM) * grp.cItemArray);
pGroup = (PGROUP)malloc(sizeof(grp) + sizeof(ITEM) * (grp.cItemArray + 1));

// Get group minimized/maximized flags

Expand All @@ -124,7 +124,7 @@ HWND CreateGroupWindow(GROUP grp)
return NULL;

// Associate the group structure pointer to the group window
SetWindowLongPtr(hWndGroup, GWLP_USERDATA, pGroup);
SetWindowLongPtr(hWndGroup, GWLP_USERDATA, (LONG_PTR)pGroup);

// Load the group icon
if (ExtractIconEx(grp.szIconPath, grp.iIconIndex, &hIconLarge, &hIconSmall, 1))
Expand Down Expand Up @@ -164,11 +164,6 @@ BOOL RemoveGroupWindow(HWND hWndGroup)
// should group deletion be "abstracted" here or should i handle windows
// and groups separately?

if ((hGroupHeap = GetWindowLongPtr(hWndGroup, GWLP_USERDATA)) != NULL)
{
if (HeapDestroy(hGroupHeap))
return TRUE;
}
return FALSE;
}

Expand Down
4 changes: 2 additions & 2 deletions progmgr/group.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
/* Definitions */
#define MAX_GROUPS 512
#define MAX_ITEMS 512
#define MAX_TITLE_LENGTH MAX_PATH
#define MAX_TITLE_LENGTH 255 // Same as the registry key name max length
// Group Format Definitions
#define GRP_SIGNATURE 0x47324D50L // PM2G
#define GRP_VERSION 1 // Increment for breaking changes
#define GRP_VERSION 2 // Increment for breaking changes, format version
// Group Flag Values (DWORD)
#define GRP_FLAG_COMMON 0x00000001
#define GRP_FLAG_READONLY 0x00000002
Expand Down
Binary file modified progmgr/resource.h
Binary file not shown.

0 comments on commit 5e6f59f

Please sign in to comment.