X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Futils_array.c;h=2d6250efd634bc90e542d030a7d6336788fb2f75;hp=93e3568d716e686d1eabeed70764f85bc1f7ffbe;hb=e3fb09073a64cc051c11c4a1bdcec493f937b764;hpb=425fad0d0ed5df28fa6876086cab68eb6b4036ff diff --git a/src/utils_array.c b/src/utils_array.c index 93e3568..2d6250e 100644 --- a/src/utils_array.c +++ b/src/utils_array.c @@ -1,3 +1,26 @@ +/** + * collection4 - utils_array.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #include #include #include @@ -104,7 +127,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++;