From da4f69af961e91db6605a451dc3040c82c1a7344 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Fri, 2 Jul 2010 20:27:51 +0200 Subject: [PATCH] src/utils_array.c: Fix a segfault in "array_prepend". --- src/utils_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils_array.c b/src/utils_array.c index 93e3568..0cc0bd7 100644 --- a/src/utils_array.c +++ b/src/utils_array.c @@ -104,7 +104,7 @@ int array_prepend (str_array_t *a, const char *entry) /* {{{ */ } a->ptr = ptr; - memmove (a->ptr, a->ptr + 1, sizeof (*a->ptr) * a->size); + memmove (a->ptr + 1, a->ptr, sizeof (*a->ptr) * a->size); a->ptr[0] = cpy; a->size++; -- 2.30.2