From 9ebabcd5091fe94174611d77aa509610ac90f867 Mon Sep 17 00:00:00 2001 From: anders_k Date: Wed, 5 Jun 2013 10:23:46 +0000 Subject: [PATCH] Fix !finalize %1 string substitution git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6373 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/build.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/build.cpp b/Source/build.cpp index a2d96e5b..3ed90fa7 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -2954,7 +2954,7 @@ int CEXEBuild::write_output(void) ERROR_MSG(_T("Error: can't allocate memory for finalize command\n")); return PS_ERROR; } - arg -= (UINT_PTR)cmdstr, arg += (UINT_PTR)cmdstrbuf; + *((UINT_PTR*)&arg) -= (UINT_PTR)cmdstr, *((UINT_PTR*)&arg) += (UINT_PTR)cmdstrbuf; _tcscpy(cmdstrbuf,cmdstr); cmdstr = cmdstrbuf; memmove(arg+cchbldoutfile, arg+2, (_tcslen(arg+2)+1)*sizeof(TCHAR));