mirror of
https://github.com/open-simh/simh.git
synced 2026-01-14 23:56:22 +00:00
VAX750: Avoid unit array overrun during TU58 init when only 1 unit exists.
As discussed in #546
This commit is contained in:
parent
a92dc610a4
commit
e7e1a9cc2c
@ -456,6 +456,8 @@ OP CODE 11 (Resened)
|
||||
|
||||
#include "pdp11_td.h"
|
||||
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
/* DL Definitions */
|
||||
|
||||
/* registers */
|
||||
@ -994,7 +996,7 @@ switch (opcode) {
|
||||
break;
|
||||
|
||||
case TD_OPINI:
|
||||
for (unit=0; unit < 2; unit++)
|
||||
for (unit=0; unit < MIN(ctlr->dptr->numunits, 2); unit++)
|
||||
sim_cancel (ctlr->uptr+unit);
|
||||
ctlr->ibptr = 0;
|
||||
ctlr->obptr = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user