From f1ee4fa69c3499392da79e5912cafd800903a8fb Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Sun, 7 Nov 2021 12:03:44 -0500 Subject: [PATCH] SCP: Updated sim_card to report correct number of cards read in. --- sim_card.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sim_card.c b/sim_card.c index 16a31bf..51beda6 100644 --- a/sim_card.c +++ b/sim_card.c @@ -819,9 +819,10 @@ _sim_parse_card(UNIT *uptr, DEVICE *dptr, struct _card_buffer *buf, uint16 (*ima temp = ascii_to_dec_029[(int)c]; break; } - if (temp & 0xf000) - (*image)[0] |= CARD_ERR; (*image)[col++] = temp & 0xfff; + if (temp & 0xf000) { + (*image)[0] |= CARD_ERR; + } } } } @@ -1353,6 +1354,10 @@ sim_card_attach(UNIT * uptr, CONST char *cptr) /* Go read the deck */ r = _sim_read_deck(uptr, eof); + /* Remove added eof from count */ + if (eof) { + previous_cards++; + } uptr->pos = saved_pos; detach_unit(uptr); if (was_attached) {