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
|
||||
if ((*ip == '%') &&
|
||||
(!isalnum(ip[1])) &&
|
||||
(ip[1] != '\0')) { /* sub? */
|
||||
(isalnum(ip[1]) || (ip[1] == '*'))) { /* sub? */
|
||||
if ((ip[1] >= '0') && (ip[1] <= ('9'))) { /* %n = sub */
|
||||
ap = do_arg[ip[1] - '0'];
|
||||
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
|
||||
break;
|
||||
ip = ip + 2;
|
||||
}
|
||||
else { /* environment variable */
|
||||
ap = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue