Fix search selector handling and a clear()ed ptr - 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 ae8b3fb2dda1bdc6750a38595c4c77ace2907c6c (DIR) parent cea0005063fa81a6d1b22d8c89dfd50f1c2f2270 (HTM) Author: Quentin Rameau <quinq@fifth.space> Date: Fri, 14 Jul 2017 23:45:36 +0200 Fix search selector handling and a clear()ed ptr Diffstat: M sacc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- (DIR) diff --git a/sacc.c b/sacc.c @@ -424,7 +424,7 @@ searchselector(Item *item) if (input = uiprompt("Enter search string: ")) { selector = item->selector; - n = strlen(input)-1 + strlen(selector); + n = strlen(selector) + 1 + strlen(input); item->selector = xmalloc(n); snprintf(item->selector, n, "%s\t%s", selector, input); free(input); @@ -498,7 +498,7 @@ delve(Item *hole) break; case '7': if (selector = searchselector(hole)) { - clear(hole->raw); + clear(&hole->raw); if (dig(entry, hole) && hole->dat) entry = hole; free(hole->selector);