From: Jérémie Astor Date: Mon, 28 Dec 2020 11:31:51 +0000 (+0100) Subject: :bug: Fix Array.remove X-Git-Tag: nightly~1076 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=958ab0b5ee638a16d2cdbb836de02b45637170a0;p=gwion.git :bug: Fix Array.remove --- diff --git a/src/lib/array.c b/src/lib/array.c index dd824abc..21da4fc6 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -102,7 +102,7 @@ ANN void m_vector_rem(const M_Vector v, m_uint index) { const m_uint size = ARRAY_SIZE(v); if(index < ARRAY_LEN(v) - 1) memmove(ARRAY_PTR(v) + index * size, ARRAY_PTR(v) + (index + 1) * size, - (ARRAY_SIZE(v) - index - 1) *size); + (ARRAY_LEN(v) - index - 1) *size); --ARRAY_LEN(v); if(ARRAY_LEN(v) < ARRAY_CAP(v) / 2) { const m_uint cap = ARRAY_CAP(v) /= 2;