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
This commit is contained in:
anders_k 2013-12-08 23:48:13 +00:00
parent 527cf2d7a4
commit f9fae88303

View file

@ -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));