From 2a141592fab20aea339e2bc9adc52d3f482ef61c Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 16 Apr 2026 13:39:09 -0600 Subject: [PATCH] Correct count in sim_fwrite Fixes #539 --- sim_fio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim_fio.c b/sim_fio.c index 0852a758..987d99cc 100644 --- a/sim_fio.c +++ b/sim_fio.c @@ -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);