size optimization - no need for both GetEnvironmentVariable and ExpandEnvironmentStrings
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4970 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5ea297c4ca
commit
b00c69290f
2 changed files with 9 additions and 15 deletions
|
@ -618,21 +618,11 @@ static int NSISCALL ExecuteEntry(entry *entry_)
|
|||
{
|
||||
char *p=var0;
|
||||
char *buf0=GetStringFromParm(0x01);
|
||||
if (parm2)
|
||||
if (!ExpandEnvironmentStrings(buf0,p,NSIS_MAX_STRLEN)
|
||||
|| (parm2 && !lstrcmp(buf0, p)))
|
||||
{
|
||||
if (!GetEnvironmentVariable(buf0,p,NSIS_MAX_STRLEN))
|
||||
{
|
||||
exec_error++;
|
||||
*p=0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!ExpandEnvironmentStrings(buf0,p,NSIS_MAX_STRLEN))
|
||||
{
|
||||
exec_error++;
|
||||
*p=0;
|
||||
}
|
||||
exec_error++;
|
||||
*p=0;
|
||||
}
|
||||
p[NSIS_MAX_STRLEN-1]=0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue