SCP: Assure proper goto and call behavior with spaces in path names
This commit is contained in:
parent
186fa30f37
commit
6cfd55180f
1 changed files with 4 additions and 1 deletions
5
scp.c
5
scp.c
|
@ -5288,7 +5288,10 @@ const char *cptr;
|
||||||
if (NULL == sim_gotofile) return SCPE_UNK; /* only valid inside of do_cmd */
|
if (NULL == sim_gotofile) return SCPE_UNK; /* only valid inside of do_cmd */
|
||||||
cptr = get_glyph (fcptr, gbuf, 0);
|
cptr = get_glyph (fcptr, gbuf, 0);
|
||||||
if ('\0' == gbuf[0]) return SCPE_ARG; /* unspecified goto target */
|
if ('\0' == gbuf[0]) return SCPE_ARG; /* unspecified goto target */
|
||||||
snprintf (cbuf, sizeof (cbuf), "%s %s", sim_do_filename[sim_do_depth], cptr);
|
snprintf (cbuf, sizeof (cbuf), "%s%s%s %s", (NULL != strchr (sim_do_filename[sim_do_depth], ' ')) ? "\"" : "",
|
||||||
|
sim_do_filename[sim_do_depth],
|
||||||
|
(NULL != strchr (sim_do_filename[sim_do_depth], ' ')) ? "\"" : "",
|
||||||
|
cptr);
|
||||||
sim_switches |= SWMASK ('O'); /* inherit ON state and actions */
|
sim_switches |= SWMASK ('O'); /* inherit ON state and actions */
|
||||||
return do_cmd_label (flag, cbuf, gbuf);
|
return do_cmd_label (flag, cbuf, gbuf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue