SIM_CARD: Fixed issues caused by last commit to sim_card.c
This commit is contained in:
parent
1a1396d0ba
commit
a58849613b
1 changed files with 2 additions and 4 deletions
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue