From 3c37b6da0ac5d7d5d767234d62a5d9bbaa969c2d Mon Sep 17 00:00:00 2001 From: Richard Cornwell Date: Sun, 11 Jun 2017 23:38:04 -0400 Subject: [PATCH] Sim_Card: Fix error in handling CBN and BCD EOF --- sim_card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sim_card.c b/sim_card.c index aebc759..128cca2 100644 --- a/sim_card.c +++ b/sim_card.c @@ -709,7 +709,7 @@ sim_read_card(UNIT * uptr) sim_debug(DEBUG_CARD, dptr, "cbn\n"); /* Check if first character is a tape mark */ if (((uint8)data->cbuff[0]) == 0217 && - (size == 1 || (((uint8)data->cbuff[0]) & 0200) != 0)) { + (size == 1 || (((uint8)data->cbuff[1]) & 0200) != 0)) { i = 1; r = SCPE_EOF; break; @@ -751,7 +751,7 @@ sim_read_card(UNIT * uptr) sim_debug(DEBUG_CARD, dptr, "bcd ["); /* Check if first character is a tape mark */ if (((uint8)data->cbuff[0]) == 0217 && - (size == 1 || (((uint8)data->cbuff[0]) & 0200) != 0)) { + (size == 1 || (((uint8)data->cbuff[1]) & 0200) != 0)) { i = 1; r = SCPE_EOF; break;