From e48cb518e8718e4a20fbc666812c9d77458a858b Mon Sep 17 00:00:00 2001 From: Mark Emmer Date: Thu, 23 Oct 2014 21:43:55 -0500 Subject: [PATCH] SDS: Correct ill-formed statement VMS compiler objected to variable ch being modified in two places in the same statement. Expand into full if statement instead. --- SDS/sds_sys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SDS/sds_sys.c b/SDS/sds_sys.c index 6898dcfb..1c2348e7 100644 --- a/SDS/sds_sys.c +++ b/SDS/sds_sys.c @@ -484,7 +484,10 @@ nonop = inst & 077777; if (sw & SWMASK ('A')) { /* SDS internal ASCII? */ for (i = 16; i >= 0; i -= 8) { ch = (inst >> i) & 0377; /* map printable chars */ - ch = ch <= 0137 ? ch += 040 : '.'; /* from int. to ext. ASCII */ + if (ch <= 0137) + ch += 040; /* from int. to ext. ASCII */ + else + ch = '.'; /* or indicate not displayable */ fprintf (of, "%c", ch); } return SCPE_OK;