Fixed bug #2680110 (embarrassing for me)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5949 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
justin1014 2009-03-10 22:24:04 +00:00
parent 407033f1d6
commit 93352bd1d7

View file

@ -3113,7 +3113,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
GrowBuf tmpstr; GrowBuf tmpstr;
char str[MAX_LINELENGTH]; char str[MAX_LINELENGTH];
for (;;) for (;;)
{ {
tmpstr.resize(0);
for (;;) for (;;)
{ {
str[0]=0; str[0]=0;
@ -3130,7 +3131,9 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
if (tmpstr.getlen() || endSlash) tmpstr.add(str,strlen(str)); if (tmpstr.getlen() || endSlash) tmpstr.add(str,strlen(str));
if (!endSlash) break; if (!endSlash) break;
} }
if (!str[0] && !tmpstr.getlen()) break; // failed
char *thisline=str; char *thisline=str;
if (tmpstr.getlen()) if (tmpstr.getlen())
@ -3139,7 +3142,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
thisline=(char *)tmpstr.get(); thisline=(char *)tmpstr.get();
} }
DefineList *tlist = searchParseString(thisline,&line,parmOffs,ignCase,true); DefineList *tlist = searchParseString(thisline,&line,parmOffs,ignCase,true);
if (tlist && tlist->getnum()) if (tlist && tlist->getnum())
{ {
@ -3152,8 +3155,6 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
else delete list; else delete list;
} }
// parse line // parse line
tmpstr.resize(0);
} }
fclose(fp); fclose(fp);
if (!noErrors) if (!noErrors)