1
0
mirror of https://github.com/rcornwell/sims.git synced 2026-03-28 02:33:22 +00:00

SIM_CARD: Fixed bug in handling of binary decks with one card.

This commit is contained in:
Richard Cornwell
2017-08-12 15:51:48 -04:00
parent 4e2e615371
commit 0c96e10254

View File

@@ -736,7 +736,7 @@ sim_read_card(UNIT * uptr)
data->image[col++] |= c;
}
if (col >= 80 && (data->cbuff[i] & 0x80) == 0) {
if (i < data->len && col >= 80 && (data->cbuff[i] & 0x80) == 0) {
r = SCPE_IOERR;
}
/* Record over length of card, skip until next */
@@ -772,7 +772,7 @@ sim_read_card(UNIT * uptr)
data->image[col++] = sim_bcd_to_hol(c);
}
if (col >= 80 && (data->cbuff[i] & 0x80) == 0) {
if (i < data->len && col >= 80 && (data->cbuff[i] & 0x80) == 0) {
r = SCPE_IOERR;
}