Fix search selector length calculation - sacc - sacc(omys), simple console gopher client | |
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/ | |
Log | |
Files | |
Refs | |
Tags | |
LICENSE | |
--- | |
commit 1ac106d2827cab446cf673c12c021ae7d2cee9fe | |
parent 1fa05223649af656df34cdcfa8f857c4ccb8954f | |
Author: Quentin Rameau | |
Date: Fri, 25 Aug 2017 13:55:30 +0200 Fix search selector length calculation We were missing a space for the terminating NULL char. Thanks to trqx for spotting this! Diffstat: M sacc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- | |
diff --git a/sacc.c b/sacc.c | |
@@ -605,7 +605,7 @@ searchselector(Item *item) return NULL; if (exp[0] && strcmp(exp, pexp)) { - n += 1 + strlen(exp); + n += strlen(exp) + 2; tag = xmalloc(n); snprintf(tag, n, "%s\t%s", selector, exp); } |