1
0
mirror of https://github.com/open-simh/simh.git synced 2026-05-20 04:50:56 +00:00

Correct count in sim_fwrite

Fixes #539
This commit is contained in:
Richard
2026-04-16 13:39:09 -06:00
committed by Paul Koning
parent 45f1ce7aea
commit 2a141592fa

View File

@@ -271,7 +271,7 @@ sptr = (const unsigned char *) bptr; /* init input ptr */
for (i = (int32)nbuf; i > 0; i--) { /* loop on buffers */
c = (i == 1)? lcnt: nelem;
sim_buf_copy_swapped (sim_flip, sptr, size, c);
sptr = sptr + size * count;
sptr = sptr + size * c;
c = fwrite (sim_flip, size, c, fptr);
if (c == 0) {
free(sim_flip);