From c1bc5bac842cbdab1193d47838d075e35cc183a6 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sat, 6 Jan 2018 17:51:06 +0000 Subject: [PATCH] Fixed "text in struct" bug introduced by a silly typo git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6966 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/System/Source/System.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Contrib/System/Source/System.c b/Contrib/System/Source/System.c index 7ad5226a..a3eb5d28 100644 --- a/Contrib/System/Source/System.c +++ b/Contrib/System/Source/System.c @@ -1117,7 +1117,7 @@ void ParamsOut(SystemProc *proc) // memory cleanup if ((proc->Params[i].allocatedBlock != NULL) - && ((partype != PT_STRUCT) || ParamIsArray(proc->Params[i])) + && ((proc->ProcType != PT_STRUCT) || ParamIsArray(proc->Params[i])) ) GlobalFree(proc->Params[i].allocatedBlock); @@ -1195,11 +1195,10 @@ HANDLE CreateCallback(SystemProc *cbproc) #ifdef POPT_SYNTAX2 static UINT GetStructParamAlignment(const ProcParameter *par) { - int partype = GetParamType(*par); - int isarr = ParamIsArray(*par); + int partype = GetParamType(*par), isarr = ParamIsArray(*par); // &l is used to get the final struct size "*(p, &l.r0)" // but it also allows you to write the struct size to the struct as a int<8|16|32|64> "*(p, &l4)" -// so we can't stop that with: if ((par->Type & PAT_ALIGNFLAG) && (!isarr || partype != PAT_LONG)) +// so we can't stop that with: "if ((par->Type & PAT_ALIGNFLAG) && (!isarr || partype != PAT_LONG))" if (par->Type & PAT_ALIGNFLAG) { if ((partype == PAT_STRING) | (partype == PAT_WSTRING)) return ByteSizeByType[partype];