diff options
Diffstat (limited to 'xs_random.h')
| -rw-r--r-- | xs_random.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xs_random.h b/xs_random.h index d076cc2..78de32a 100644 --- a/xs_random.h +++ b/xs_random.h @@ -66,7 +66,8 @@ void *xs_rnd_buf(void *buf, int size) /* fill with full integers */ while (n--) { xs_rnd_int32_d(&s); - p = memcpy(p, &s, sizeof(s)) + sizeof(s); + memcpy(p, &s, sizeof(s)); + p += sizeof(s); } if ((n = size % sizeof(s))) { |