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:
kichik 2007-03-03 14:18:20 +00:00
parent 5ea297c4ca
commit b00c69290f
2 changed files with 9 additions and 15 deletions

View file

@ -5239,7 +5239,11 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
ent.which=EW_READENVSTR;
ent.offsets[0]=GetUserVarIndex(line, 1);
{
ent.offsets[1]=add_string(line.gettoken_str(2));
char str[NSIS_MAX_STRLEN];
strcpy(str, "%");
strcat(str, line.gettoken_str(2));
strcat(str, "%");
ent.offsets[1]=add_string(str);
if (ent.offsets[0] < 0 || strlen(line.gettoken_str(2))<1) PRINTHELP()
}
ent.offsets[2]=1;