i don't know what i was doing here

this is all getting rewritten
This commit is contained in:
Brady McDermott
2024-03-30 12:47:23 -06:00
parent 7a3c1ae092
commit 8939e71a99

View File

@@ -214,12 +214,12 @@ BOOL CALLBACK SaveWindowEnumProc(HWND hWndGroup, LPARAM lParam)
return FALSE; return FALSE;
// lean it... // lean it...
pNewGroup = realloc(pGroup, CalculateGroupMemory(pGroup, 1, 1)); /*pNewGroup = realloc(pGroup, CalculateGroupMemory(pGroup, 1, 1));
if (pNewGroup != NULL) if (pNewGroup != NULL)
{ {
pGroup = pNewGroup; pGroup = pNewGroup;
SetWindowLongPtr(hWndGroup, GWLP_USERDATA, (LONG_PTR)pGroup); SetWindowLongPtr(hWndGroup, GWLP_USERDATA, (LONG_PTR)pGroup);
} }*/
// save it... // save it...
if (RegistrySaveGroup(pGroup) != RCE_SUCCESS) if (RegistrySaveGroup(pGroup) != RCE_SUCCESS)
@@ -313,6 +313,14 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)
// allocate memory for the group // allocate memory for the group
pGroup = malloc(cbGroup); pGroup = malloc(cbGroup);
if (pGroup == NULL)
{
dwConfigStatus = dwConfigStatus && RCE_GROUPS;
return dwConfigStatus;
}
ZeroMemory(pGroup, cbGroup);
// get the group // get the group
RegQueryValueEx(hKeyProgramGroups, (LPWSTR)&szValueName, NULL, NULL, RegQueryValueEx(hKeyProgramGroups, (LPWSTR)&szValueName, NULL, NULL,
(LPBYTE)pGroup, &cbGroup); (LPBYTE)pGroup, &cbGroup);
@@ -325,10 +333,10 @@ DWORD LoadConfig(_In_ BOOL bSettings, _In_ BOOL bPos, _In_ BOOL bGroups)
// free memory // free memory
free(pGroup); free(pGroup);
} }
// increment
cGroupIndex++;
} }
// increment
cGroupIndex++;
} }
} }