mirror of
https://github.com/simh/simh.git
synced 2026-03-01 17:36:49 +00:00
SCP: Fixed 'rest of line' argument substitution %*
This commit is contained in:
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;
|
||||
|
||||
Reference in New Issue
Block a user