SCP: Allow single digit argument insertion for DO command arguments
This commit is contained in:
parent
93f92b7fb3
commit
2b112b0e13
1 changed files with 1 additions and 2 deletions
3
scp.c
3
scp.c
|
@ -3793,8 +3793,7 @@ for (ip = instr, op = tmpbuf; *ip && (op < oend); ) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ((*ip == '%') && /* %n = sub */
|
if ((*ip == '%') && /* %n = sub */
|
||||||
((sim_isdigit(ip[1]) && !sim_isdigit(ip[2])) ||
|
(sim_isdigit(ip[1]) || (ip[1] == '*'))) {
|
||||||
(ip[1] == '*'))) {
|
|
||||||
if ((ip[1] >= '0') && (ip[1] <= '9')) {
|
if ((ip[1] >= '0') && (ip[1] <= '9')) {
|
||||||
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 */
|
||||||
|
|
Loading…
Add table
Reference in a new issue