--- libaitio/inc/aitio.h 2012/03/29 12:23:00 1.16.2.2 +++ libaitio/inc/aitio.h 2012/04/02 08:10:57 1.16.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.16.2.2 2012/03/29 12:23:00 misho Exp $ +* $Id: aitio.h,v 1.16.2.4 2012/04/02 08:10:57 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -166,11 +166,13 @@ typedef struct { } } while (0) #define AIT_SET_STRCAT(_vl, _v) do { ait_val_t *__val = (_vl); assert(__val); \ assert(AIT_TYPE(__val) == string); \ - void *__p = realloc(AIT_LEN(__val) + strlen((_v))); \ + void *__p = realloc(__val->val.string, \ + AIT_LEN(__val) + strlen((_v))); \ if (__p) { \ __val->val.string = __p; \ AIT_LEN(__val) += strlen((_v)); \ - strlcat(__val->val.string, (_v), AIT_LEN(__val)); \ + strlcat((char*) __val->val.string, (_v), \ + AIT_LEN(__val)); \ } } while (0) #define AIT_SET_BLOB(_vl, _n, _len) do { ait_val_t *__val = (_vl); assert(__val); \ __val->val_type = blob; AIT_LEN(__val) = _len; \