diff options
| -rw-r--r-- | anteraja.c | 4 | 
1 files changed, 3 insertions, 1 deletions
@@ -108,8 +108,10 @@ void anteraja_order(const char *trx_id, const char *service, const char *sender_  				atoi(items[i][PRICE]), atoi(items[i][WEIGHT]) * 1000);  		if (json)  			json = realloc(json, strlen(json) + length); -		else +		else {  			json = malloc(length); +			memset(json, '\0', strlen(json)); +		}  		strcat(json, item);  		if (i + 1 < nitems)  			json[length] = ',';  |