mirror of
https://github.com/simh/simh.git
synced 2026-02-27 09:09:46 +00:00
SCP: Fix output produced when EXAMINE an array register
This problem was a latent bug introduced when summarized array register output was added back in 2013 or 2018. This fixes the problem reported in https://github.com/open-simh/simh/issues/499
This commit is contained in:
16
scp.c
16
scp.c
@@ -10536,18 +10536,10 @@ for (rptr = lowr; rptr <= highr; rptr++) {
|
||||
if ((idx > lows) && (val == last_val))
|
||||
continue;
|
||||
if (idx > val_start+1) {
|
||||
if (idx-1 == val_start+1) {
|
||||
reason = ex_reg (ofile, val, flag, rptr, idx-1);
|
||||
sim_switches = saved_switches;
|
||||
if (reason != SCPE_OK)
|
||||
return reason;
|
||||
}
|
||||
else {
|
||||
if (val_start+1 != idx-1)
|
||||
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
|
||||
else
|
||||
fprintf (ofile, "%s[%d]: same as above\n", rptr->name, val_start+1);
|
||||
}
|
||||
if (val_start+1 != idx-1)
|
||||
fprintf (ofile, "%s[%d]-%s[%d]: same as above\n", rptr->name, val_start+1, rptr->name, idx-1);
|
||||
else
|
||||
fprintf (ofile, "%s[%d]: same as above\n", rptr->name, val_start+1);
|
||||
}
|
||||
last_val = val;
|
||||
val_start = idx;
|
||||
|
||||
Reference in New Issue
Block a user