diff --git a/Source/script.cpp b/Source/script.cpp index ac3f2ad2..b318e5e8 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3113,7 +3113,8 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) GrowBuf tmpstr; char str[MAX_LINELENGTH]; for (;;) - { + { + tmpstr.resize(0); for (;;) { 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 (!endSlash) break; - } + } + + if (!str[0] && !tmpstr.getlen()) break; // failed char *thisline=str; if (tmpstr.getlen()) @@ -3139,7 +3142,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) thisline=(char *)tmpstr.get(); } - + DefineList *tlist = searchParseString(thisline,&line,parmOffs,ignCase,true); if (tlist && tlist->getnum()) { @@ -3152,8 +3155,6 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) else delete list; } // parse line - - tmpstr.resize(0); } fclose(fp); if (!noErrors)