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) | |||
| 66 | /* fill with full integers */ | 66 | /* fill with full integers */ |
| 67 | while (n--) { | 67 | while (n--) { |
| 68 | xs_rnd_int32_d(&s); | 68 | xs_rnd_int32_d(&s); |
| 69 | p = memcpy(p, &s, sizeof(s)) + sizeof(s); | 69 | memcpy(p, &s, sizeof(s)); |
| 70 | p += sizeof(s); | ||
| 70 | } | 71 | } |
| 71 | 72 | ||
| 72 | if ((n = size % sizeof(s))) { | 73 | if ((n = size % sizeof(s))) { |