Improve Windows build.
@@ -103,7 +103,7 @@ read_random(void *buf, size_t size)
position = 0;
while (position < size) {
if (rand_s(&randval) == 0) {
- remaining = MIN(count - i, sizeof(unsigned int));
+ remaining = MIN(size - position, sizeof(unsigned int));
memcpy((char *)buf + position, &randval, remaining);
position += sizeof(unsigned int)
}
