xbps-query/search: pass correct length to strlcat to truncate results.

This commit is contained in:
Juan RP 2014-11-18 07:35:25 +01:00
parent d53b2c57cc
commit 83d00e4e8c

View File

@ -84,7 +84,7 @@ print_results(struct xbps_handle *xhp, struct search_data *sd)
assert(out);
snprintf(out, sd->maxcols-3, "%s %s %s",
inststr, tmp, desc);
xbps_strlcat(out, "...\n", sizeof(*out));
xbps_strlcat(out, "...\n", sd->maxcols+1);
printf("%s", out);
free(out);
} else {