--- libelwix/src/array.c 2019/01/21 11:56:39 1.5.36.1 +++ libelwix/src/array.c 2019/01/21 12:26:38 1.6.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: array.c,v 1.5.36.1 2019/01/21 11:56:39 misho Exp $ +* $Id: array.c,v 1.6.2.1 2019/01/21 12:26:38 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -185,15 +185,14 @@ array_Reset(array_t * __restrict arr, int purge) if (!arr) return; - arr->arr_last = -1; - arr->arr_num = 0; - if (purge && arr->arr_data) { e_free(arr->arr_data); + arr->arr_num = 0; arr->arr_data = e_calloc(array_Size(arr), sizeof(intptr_t)); } array_Zero(arr); + arr->arr_last = -1; } /*