From 3513e43f0ffd7950e23ec59af76f77950afab96f Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Mon, 23 Jun 2008 17:26:27 +0200 Subject: [PATCH] fix stupid array bug: missing sizeof() Signed-off-by: Pierre Habouzit --- common/array.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/array.h b/common/array.h index a84626545..d6ddc9c16 100644 --- a/common/array.h +++ b/common/array.h @@ -66,7 +66,7 @@ dtor(&arr->tab[i]); \ } \ memmove(arr->tab + pos + count, arr->tab + pos + len, \ - arr->len - pos - len); \ + (arr->len - pos - len) * sizeof(*items)); \ arr->len += count - len; \ } \ memcpy(arr->tab + pos, items, count * sizeof(*items)); \