From f9fae88303b42aada19597a50e3a65c5f525dbc8 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 8 Dec 2013 23:48:13 +0000 Subject: [PATCH] PE NSIS_VARS_SECTION size should not depend on sizeof(TCHAR) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6419 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 9fb94a63..80def597 100644 --- a/Source/build.cpp +++ b/Source/build.cpp @@ -2331,7 +2331,7 @@ int CEXEBuild::SetVarsSection() VerifyDeclaredUserVarRefs(&m_UserVarNames); int MaxUserVars = m_UserVarNames.getnum(); - int stringSize = NSIS_MAX_STRLEN*(build_unicode?sizeof(TCHAR):sizeof(char)); + int stringSize = NSIS_MAX_STRLEN * (build_unicode?2:1); if (!res_editor->SetPESectionVirtualSize(NSIS_VARS_SECTION, MaxUserVars * stringSize)) { ERROR_MSG(_T("Internal compiler error #12346: invalid exehead cannot find section \"%") NPRIs _T("\"!\n"), _T(NSIS_VARS_SECTION));