mirror of
https://github.com/simh/simh.git
synced 2026-04-25 19:51:25 +00:00
SCP: Allow bare % not followed by a digit or a alpha character to be kept while substituting arguments and environment variables in simulator commands.
This commit is contained in:
4
scp.c
4
scp.c
@@ -1792,7 +1792,9 @@ for (; *ip && (op < oend); ) {
|
|||||||
*op++ = *ip++; /* copy escaped char */
|
*op++ = *ip++; /* copy escaped char */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (*ip == '%') { /* sub? */
|
if ((*ip == '%') &&
|
||||||
|
(!isalnum(ip[1])) &&
|
||||||
|
(ip[1] != '\0')) { /* sub? */
|
||||||
if ((ip[1] >= '0') && (ip[1] <= ('9'))) { /* %n = sub */
|
if ((ip[1] >= '0') && (ip[1] <= ('9'))) { /* %n = sub */
|
||||||
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