SCP: Fixed 'rest of line' argument substitution %*
This commit is contained in:
parent
f5cfa392d7
commit
b85af46402
1 changed files with 2 additions and 2 deletions
4
scp.c
4
scp.c
|
@ -1793,8 +1793,7 @@ for (; *ip && (op < oend); ) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ((*ip == '%') &&
|
if ((*ip == '%') &&
|
||||||
(!isalnum(ip[1])) &&
|
(isalnum(ip[1]) || (ip[1] == '*'))) { /* sub? */
|
||||||
(ip[1] != '\0')) { /* sub? */
|
|
||||||
if ((ip[1] >= '0') && (ip[1] <= ('9'))) { /* %n = sub */
|
if ((ip[1] >= '0') && (ip[1] <= ('9'))) { /* %n = sub */
|
||||||
ap = do_arg[ip[1] - '0'];
|
ap = do_arg[ip[1] - '0'];
|
||||||
for (i=0; i<ip[1] - '0'; ++i) /* make sure we're not past the list end */
|
for (i=0; i<ip[1] - '0'; ++i) /* make sure we're not past the list end */
|
||||||
|
@ -1823,6 +1822,7 @@ for (; *ip && (op < oend); ) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
ip = ip + 2;
|
||||||
}
|
}
|
||||||
else { /* environment variable */
|
else { /* environment variable */
|
||||||
ap = NULL;
|
ap = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue