Skip to content

Commit

Permalink
i don't know what i was doing here
Browse files Browse the repository at this point in the history
this is all getting rewritten
  • Loading branch information
freedom7341 committed Mar 30, 2024
1 parent 7a3c1ae commit 8939e71
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions progmgr/registry.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ BOOL CALLBACK SaveWindowEnumProc(HWND hWndGroup, LPARAM lParam)
return FALSE;

// lean it...
pNewGroup = realloc(pGroup, CalculateGroupMemory(pGroup, 1, 1));
/*pNewGroup = realloc(pGroup, CalculateGroupMemory(pGroup, 1, 1));
if (pNewGroup != NULL)
{
pGroup = pNewGroup;
SetWindowLongPtr(hWndGroup, GWLP_USERDATA, (LONG_PTR)pGroup);
}
}*/

// save it...
if (RegistrySaveGroup(pGroup) != RCE_SUCCESS)
Expand Down Expand Up @@ -312,6 +312,14 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)

// allocate memory for the group
pGroup = malloc(cbGroup);

if (pGroup == NULL)
{
dwConfigStatus = dwConfigStatus && RCE_GROUPS;
return dwConfigStatus;
}

ZeroMemory(pGroup, cbGroup);

// get the group
RegQueryValueEx(hKeyProgramGroups, (LPWSTR)&szValueName, NULL, NULL,
Expand All @@ -325,10 +333,10 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)
// free memory
free(pGroup);
}

// increment
cGroupIndex++;
}

// increment
cGroupIndex++;
}
}

Expand Down

0 comments on commit 8939e71

Please sign in to comment.