--- libaitio/inc/aitio.h 2012/04/11 15:01:03 1.16.2.12 +++ libaitio/inc/aitio.h 2012/04/24 08:24:01 1.16.2.13 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.16.2.12 2012/04/11 15:01:03 misho Exp $ +* $Id: aitio.h,v 1.16.2.13 2012/04/24 08:24:01 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -597,7 +597,7 @@ int io_arrayGrow(array_t * __restrict arr, int newNumI int io_arrayVacuum(array_t * __restrict arr, int fromWhere); #define io_arraySize(_arr) ((_arr) ? (_arr)->arr_num : 0) -#define io_arrayLast(_arr) ((_arr) ? (_arr)->arr_last : -1) +#define io_arrayLast(_arr) (io_arraySize((_arr)) ? (_arr)->arr_last : -1) #define io_arrayZero(_arr) (assert((_arr)), memset((_arr)->arr_data, 0, \ io_arraySize((_arr)) * sizeof(void*)))