From bcb7a623f1e93e89698bcbe8e3c831bc960a2e0c Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 28 Nov 2002 15:57:53 +0000 Subject: [PATCH] Fixed bug with escaping quotes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1848 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/lineparse.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/lineparse.h b/Source/lineparse.h index d40f5d22..9445a707 100644 --- a/Source/lineparse.h +++ b/Source/lineparse.h @@ -117,6 +117,7 @@ class LineParser { else if (*line == '`') lstate=4; if (lstate) line++; int nc=0; + char *p = line; while (*line) { if (line[0] == '$' && line[1] == '\\') { @@ -124,7 +125,7 @@ class LineParser { case '"': case '\'': case '`': - nc += 3; + nc += 1; line += 3; } } @@ -137,10 +138,9 @@ class LineParser { } if (m_tokens) { - char *p; int i; m_tokens[m_nt]=(char*)malloc(nc+1); - for (i = 0, p = line - nc; p < line; i++, p++) { + for (i = 0; p < line; i++, p++) { if (p[0] == '$' && p[1] == '\\') { switch (p[2]) { case '"':