commit ae8b3fb2dda1bdc6750a38595c4c77ace2907c6c
parent cea0005063fa81a6d1b22d8c89dfd50f1c2f2270
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:
1 file changed, 2 insertions(+), 2 deletions(-)
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);