From 6875b3b31bad19595def7bd8fa4d8efe3f4f9c9e Mon Sep 17 00:00:00 2001 From: justin1014 Date: Wed, 10 Jun 2009 21:26:01 +0000 Subject: [PATCH] Fixed bug in !searchparse (bug 2803622) git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5992 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/script.cpp b/Source/script.cpp index 784c1f06..a492051a 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -3142,7 +3142,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) { str[0]=0; fgets(str,sizeof(str),fp); - if (!str[0]) break; + if (!str[0]) break; // eof char *p=str; while (*p) p++; @@ -3153,10 +3153,11 @@ int CEXEBuild::doCommand(int which_token, LineParser &line) bool endSlash = (str[0] && str[strlen(str)-1] == '\\'); if (tmpstr.getlen() || endSlash) tmpstr.add(str,strlen(str)); - if (!endSlash) break; + // if we have valid contents and not ending on slash, then done + if (!endSlash && (str[0] || tmpstr.getlen())) break; } - if (!str[0] && !tmpstr.getlen()) break; // failed + if (!str[0] && !tmpstr.getlen()) break; // reached eof char *thisline=str; if (tmpstr.getlen())