diff options
Diffstat (limited to 'memdup.c')
-rw-r--r-- | memdup.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -6,7 +6,7 @@ void * libsimple_memdup(const void *s, size_t n) { - void *ret = malloc(n ? n : (size_t)1); + void *ret = malloc(n + !n); if (!ret) return NULL; return memcpy(ret, s, n); |