if (ret < max) {
ok = true;
+ /* Make sure tal_count() is correct! */
+ tal_resize(buf, off + ret + 1);
break;
}
max *= 2;
totlen += dlen;
}
ret[totlen] = '\0';
+ /* Make sure tal_count() is correct! */
+ tal_resize(&ret, totlen+1);
out:
if (taken(strings))
tal_free(strings);