From 64449f89501ccc8873269c74cf964fc3e2313ec6 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Sun, 1 Jun 2025 12:44:27 +0200 Subject: [PATCH] Imlac: Better parsing of load switches. "load -s" loads a "special tty" image file, just like a plain "load" will. An unknown switch will raise an error. --- imlac/imlac_sys.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/imlac/imlac_sys.c b/imlac/imlac_sys.c index b9726a3f..41619236 100644 --- a/imlac/imlac_sys.c +++ b/imlac/imlac_sys.c @@ -223,14 +223,15 @@ sim_load (FILE *fileref, CONST char *cptr, CONST char *fnam, int flag) { if (sim_switches & SWMASK ('T')) ; - if (sim_switches & SWMASK ('S')) + else if (sim_switches == 0 || (sim_switches & SWMASK ('S')) != 0) return load_stty (fileref); - if (sim_switches & SWMASK ('M')) + else if (sim_switches & SWMASK ('M')) ; - if (sim_switches & SWMASK ('P')) + else if (sim_switches & SWMASK ('P')) return load_ptr (fileref); - - return load_stty (fileref); + else + return SCPE_ARG; + return SCPE_OK; } t_bool build_dev_tab (void)