mirror of
https://github.com/simh/simh.git
synced 2026-01-14 23:55:06 +00:00
SCP: Fixed 'rest of line' argument substitution %*
This commit is contained in:
parent
f5cfa392d7
commit
b85af46402
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…
x
Reference in New Issue
Block a user