Fix search selector length calculation - sacc - sacc(omys), simple console gopher client
(HTM) git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) LICENSE
---
(DIR) commit 1ac106d2827cab446cf673c12c021ae7d2cee9fe
(DIR) parent 1fa05223649af656df34cdcfa8f857c4ccb8954f
(HTM) Author: Quentin Rameau <quinq@fifth.space>
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(-)
---
(DIR) 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);
}