Fixed bug with escaping quotes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1848 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
af8de924f9
commit
bcb7a623f1
1 changed files with 3 additions and 3 deletions
|
@ -117,6 +117,7 @@ class LineParser {
|
||||||
else if (*line == '`') lstate=4;
|
else if (*line == '`') lstate=4;
|
||||||
if (lstate) line++;
|
if (lstate) line++;
|
||||||
int nc=0;
|
int nc=0;
|
||||||
|
char *p = line;
|
||||||
while (*line)
|
while (*line)
|
||||||
{
|
{
|
||||||
if (line[0] == '$' && line[1] == '\\') {
|
if (line[0] == '$' && line[1] == '\\') {
|
||||||
|
@ -124,7 +125,7 @@ class LineParser {
|
||||||
case '"':
|
case '"':
|
||||||
case '\'':
|
case '\'':
|
||||||
case '`':
|
case '`':
|
||||||
nc += 3;
|
nc += 1;
|
||||||
line += 3;
|
line += 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,10 +138,9 @@ class LineParser {
|
||||||
}
|
}
|
||||||
if (m_tokens)
|
if (m_tokens)
|
||||||
{
|
{
|
||||||
char *p;
|
|
||||||
int i;
|
int i;
|
||||||
m_tokens[m_nt]=(char*)malloc(nc+1);
|
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] == '\\') {
|
if (p[0] == '$' && p[1] == '\\') {
|
||||||
switch (p[2]) {
|
switch (p[2]) {
|
||||||
case '"':
|
case '"':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue