diff --git a/VAX/vax860_stddev.c b/VAX/vax860_stddev.c index 759166db..ea9a55e3 100644 --- a/VAX/vax860_stddev.c +++ b/VAX/vax860_stddev.c @@ -1102,8 +1102,8 @@ switch (rlcs_state) { if (sim_fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR; bcnt = sim_fread (rlcs_buf, sizeof (int16), RL_NUMBY, uptr->fileref); - if (bcnt != (sizeof (int16) * RL_NUMBY)) - return SCPE_IOERR; + for ( ; bcnt < RL_NUMBY; bcnt++) /* fill buffer */ + rlcs_buf[bcnt] = 0; } if (rlcs_bcnt < RL_NUMBY) { /* more data in buffer? */ cso_buf = rlcs_buf[rlcs_bcnt++]; /* return next word */ @@ -1133,7 +1133,7 @@ switch (rlcs_state) { if (sim_fseek (uptr->fileref, da, SEEK_SET)) return SCPE_IOERR; bcnt = sim_fwrite (rlcs_buf, sizeof (int16), RL_NUMBY, uptr->fileref); - if (bcnt != (sizeof (int16) * RL_NUMBY)) + if (bcnt != RL_NUMBY) return SCPE_IOERR; rlcs_state = RL_IDLE; /* now idle */ rlcs_bcnt = 0;