X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=src%2Fcore%2Fdata.c;h=1baeadafc2dfb79e65c933964e3111f157f36cca;hp=0e40474edaabab45e98b9dc30d31b2b244de33d9;hb=3d8d3baf2658eec2ccb96fbe666ef7cdfc2a4376;hpb=c5e7e465a3ec8eccfd881411f08244d8c5265660 diff --git a/src/core/data.c b/src/core/data.c index 0e40474..1baeada 100644 --- a/src/core/data.c +++ b/src/core/data.c @@ -279,7 +279,7 @@ data_concat(const sdb_data_t *d1, const sdb_data_t *d2, sdb_data_t *res) } else if (d1->type & SDB_TYPE_ARRAY) { res->data.array.values = new; - res->data.array.length = len1 + len2; + res->data.array.length = d1->data.array.length + d2->data.array.length; if (copy_array_values(res, res, sdb_data_sizeof(res->type & 0xff))) { /* this leaks already copied values but there's not much we can * do and this should only happen if we're in trouble anyway */