Bug fix & simplification on SetArgv

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6065 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-04-19 10:06:48 +00:00
parent 9b0e3aeb62
commit 2d3bf19b0d
3 changed files with 12 additions and 14 deletions

View file

@ -121,12 +121,9 @@ void AddScriptCmdArgs(const TCHAR *arg)
void ProcessCommandLine()
{
int argc;
TCHAR **argv;
int i, j;
int argSpaceSize;
argSpaceSize = SetArgv((TCHAR *)GetCommandLine(), &argc, &argv);
int argc = SetArgv((TCHAR *)GetCommandLine(), &argv);
if (argc > 1) {
for (i = 1; i < argc; i++)
{
@ -165,7 +162,7 @@ void ProcessCommandLine()
}
}
if (argSpaceSize)
if (argv)
GlobalFree(argv);
}