summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mansearch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mansearch.c b/mansearch.c
index 85920d0f..1a5eba7f 100644
--- a/mansearch.c
+++ b/mansearch.c
@@ -516,6 +516,8 @@ buildoutput(size_t im, struct dbm_page *page)
output = mandoc_malloc(sz);
i = 0;
lstcat(output, &i, input, " # ");
+ output[i++] = '\0';
+ assert(i == sz);
return output;
}