# HG changeset patch # User Paul Boddie # Date 1480251025 -3600 # Node ID 992b2df1ab692c2a9dfc9aa7ba1fc8d6cd68ddab # Parent 41e0c7358ddf6ec5371eb9e4089a45bfbe0940f0 Fixed the buffer length computation when serialising. diff -r 41e0c7358ddf -r 992b2df1ab69 templates/native.c --- a/templates/native.c Sun Nov 27 00:33:50 2016 +0100 +++ b/templates/native.c Sun Nov 27 13:50:25 2016 +0100 @@ -476,7 +476,7 @@ /* Calculate the size of the string. */ for (i = 0; i < data->size; i++) - size += strlen(data->attrs[i].strvalue); + size += strlen(__load_via_object(data->attrs[i].value, __pos___data__).strvalue); /* Reserve space for a new string. */ s = calloc(size + 1, sizeof(char));