summary refs log tree commit diff
path: root/doc.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc.c')
-rw-r--r--doc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc.c b/doc.c
index d43ff30..aa18369 100644
--- a/doc.c
+++ b/doc.c
@@ -51,8 +51,9 @@ void doc_add_text(struct doc *d, strv_t s) {
 	dl->len += s.n;
 }
 
-unsigned short doc_add_link(struct doc *d, const char *url) {
-	buf_cat(&d->lnk, url, strlen(url) + 1);
+unsigned short doc_add_link(struct doc *d, strv_t url) {
+	buf_cat(&d->lnk, url);
+	buf_catc(&d->lnk, 0);
 	return d->linkc++;
 }