SCP: On startup, only exit if initialization file explicitly returns SCPE_EXIT
Fix for problem reported in #625
This commit is contained in:
parent
f48c282dff
commit
9a716a7689
1 changed files with 3 additions and 3 deletions
6
scp.c
6
scp.c
|
@ -2528,7 +2528,7 @@ if (cptr && sizeof (nbuf) > strlen (cptr) + strlen ("/simh.ini") + 1) {
|
|||
sprintf(nbuf, "\"%s%s%ssimh.ini\"", cptr2 ? cptr2 : "", cptr, strchr (cptr, '/') ? "/" : "\\");
|
||||
stat = do_cmd (-1, nbuf) & ~SCPE_NOMESSAGE; /* simh.ini proc cmd file */
|
||||
}
|
||||
if (stat == SCPE_OPENERR)
|
||||
if (SCPE_BARE_STATUS(stat) == SCPE_OPENERR)
|
||||
stat = do_cmd (-1, "simh.ini"); /* simh.ini proc cmd file */
|
||||
if (*cbuf) /* cmd file arg? */
|
||||
stat = do_cmd (0, cbuf); /* proc cmd file */
|
||||
|
@ -2552,13 +2552,13 @@ else if (*argv[0]) { /* sim name arg? */
|
|||
}
|
||||
}
|
||||
}
|
||||
if (stat == SCPE_OPENERR) /* didn't exist/can't open? */
|
||||
if (SCPE_BARE_STATUS(stat) == SCPE_OPENERR) /* didn't exist/can't open? */
|
||||
stat = SCPE_OK;
|
||||
|
||||
if (sim_switches & SWMASK ('T')) /* Command Line -T switch */
|
||||
stat = sim_library_unit_tests (); /* run library unit tests */
|
||||
|
||||
if (stat == SCPE_OK)
|
||||
if (SCPE_BARE_STATUS(stat) != SCPE_EXIT)
|
||||
process_stdin_commands (SCPE_BARE_STATUS(stat), argv);
|
||||
|
||||
detach_all (0, TRUE); /* close files */
|
||||
|
|
Loading…
Add table
Reference in a new issue