Skip to content

Commit

Permalink
SIM_CARD: Fixed issues caused by last commit to sim_card.c
Browse files Browse the repository at this point in the history
  • Loading branch information
rcornwell committed Feb 16, 2024
1 parent 1a1396d commit a588496
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sim_card.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,10 +993,7 @@ _sim_read_deck(UNIT * uptr, int eof)
do {
if (buf.len < 500 && !feof(uptr->fileref)) {
l = sim_fread(&buf.buffer[buf.len], 1, 8192, uptr->fileref);
if (l < 0)
r = SCPE_OPENERR;
else
buf.len += l;
buf.len += l;
}

/* Allocate space for some more cards if needed */
Expand All @@ -1023,6 +1020,7 @@ _sim_read_deck(UNIT * uptr, int eof)
j = buf.size;
for(i = 0; i < l; i++, j++)
buf.buffer[i] = buf.buffer[j];
buf.buffer[i] = '\0';
buf.len -= buf.size;
} while (buf.len > 0 && r == SCPE_OK);

Expand Down

0 comments on commit a588496

Please sign in to comment.