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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user