Archive: coding error in LockedList.cpp


coding error in LockedList.cpp
I replaced original source line:

if (FilesCount < MAX_FILE_COUNT)

with

if (ModulesCount < MAX_FILE_COUNT)

in the following procedure. This appeared to be a coding error to me. The error could have been the cause of my testers crashed install.

// NSIS Function: Add a module.
extern "C"
void __declspec(dllexport) AddModule(HWND hWndParent, int string_size, char *variables, stack_t **stacktop, extra_parameters *extra)
{
g_hWndParent = hWndParent;
EXDLL_INIT();
{
if (ModulesCount < MAX_FILE_COUNT) << line replaced
{
ModulesList[ModulesCount] = (TCHAR*)GlobalAlloc(GPTR, sizeof(TCHAR)*MAX_PATH);
popstring(ModulesList[ModulesCount]);
ModulesCount++;
}
else
pushstring(OUT_ERROR);
}
}


Thanks, fixed. A crash would only occur if you added 128 modules though, so I doubt that was it.

Stu