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:
parent
527cf2d7a4
commit
f9fae88303
1 changed files with 1 additions and 1 deletions
|
@ -2331,7 +2331,7 @@ int CEXEBuild::SetVarsSection()
|
||||||
|
|
||||||
VerifyDeclaredUserVarRefs(&m_UserVarNames);
|
VerifyDeclaredUserVarRefs(&m_UserVarNames);
|
||||||
int MaxUserVars = m_UserVarNames.getnum();
|
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))
|
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));
|
ERROR_MSG(_T("Internal compiler error #12346: invalid exehead cannot find section \"%") NPRIs _T("\"!\n"), _T(NSIS_VARS_SECTION));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue