mirror of
https://github.com/simh/simh.git
synced 2026-04-17 00:36:00 +00:00
SCP: Allow single digit argument insertion for DO command arguments
This commit is contained in:
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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user