From b007669ad5556b7e1e0b19de4f5d8d8d0789c4b4 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Tue, 5 Jun 2018 08:51:19 -0700 Subject: [PATCH] TMXR: Don't allow 0 speed specifier for speed programmable mux devices As reported in #587 --- sim_tmxr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sim_tmxr.c b/sim_tmxr.c index 79549ef1..96333512 100644 --- a/sim_tmxr.c +++ b/sim_tmxr.c @@ -2658,7 +2658,9 @@ while (*tptr) { if ((NULL == cptr) || ('\0' == *cptr) || (_tmln_speed_delta (cptr) < 0)) return sim_messagef (SCPE_ARG, "Invalid Speed Specifier: %s\n", (cptr ? cptr : "")); - if (mp->port_speed_control && (_tmln_speed_delta (cptr) > 0) && (!(sim_switches & SIM_SW_REST))) + if (mp->port_speed_control && + ((_tmln_speed_delta (cptr) > 0) || (*cptr != '*')) && + (!(sim_switches & SIM_SW_REST))) return sim_messagef (SCPE_ARG, "%s simulator programmatically sets %sport speed\n", sim_name, dev_name); strlcpy (speed, cptr, sizeof(speed)); continue;