Fix: $ is ignored in the begginning of quoted line

This commit is contained in:
z3APA3A 2018-12-05 14:21:03 +03:00
parent cc503ba925
commit a0591c9786

View File

@ -1556,7 +1556,6 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
unsigned char * incbegin = 0;
int fd;
int res, len;
int i = 1;
unsigned char *str1;
for(;;str++){
@ -1575,7 +1574,14 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
argm[argc] = 0;
return argc;
case '$':
if(!comment && !included){
if(comment){
if(space){
argm[argc++] = str;
if(argc >= nitems) return argc;
space = 0;
}
}
else if(!included){
incbegin = str;
*str = 0;
}
@ -1587,7 +1593,6 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
if(!comment){
*str = 0;
space = 1;
i = 0;
if(incbegin){
argc--;
if((fd = open((char *)incbegin+1, O_RDONLY)) <= 0){
@ -1625,7 +1630,6 @@ int parsestr (unsigned char *str, unsigned char **argm, int nitems, unsigned cha
break;
}
default:
i++;
if(space) {
if(comment && *str == '\"' && str[1] != '\"'){
str++;