wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit abf4198f682784af6545028d29c0e3cc7048628d
parent 0cdd4e85a83c5229e89b37d5c9e3edf627b2553e
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Mon,  3 Apr 2006 17:49:45 +0200

memmove needs to be multiplicated with sizeof(void *) I suspect...


Diffstat:
libcext/vector.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libcext/vector.c b/libcext/vector.c @@ -1,7 +1,6 @@ /* extendible vectors. Icarus Sparry 2006. Public domain. */ #include <stdlib.h> #include <stdio.h> -#include <string.h> #include <unistd.h> #include "cext.h" @@ -24,7 +23,8 @@ cext_vdetach(Vector *v, void *data) if (!p) return; for(end = p + v->size - 1; p <= end; p++) if (*p == data) { - memmove(p, p + 1, end - p); + for(; p < end; p++) + p[0] = p[1]; *end = nil; --v->size; return;