noice

small file browser
git clone git://git.2f30.org/noice
Log | Files | Refs | README | LICENSE

commit 30ca80310aa805aee1e3501da6c6a27812855978
parent ea0cce7b6390cab3ba7c16560f50e69322eb89fb
Author: sin <sin@2f30.org>
Date:   Fri, 20 Nov 2015 11:55:41 +0000

Properly handle empty filters

Diffstat:
Mnoice.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/noice.c b/noice.c @@ -331,10 +331,11 @@ readln(void) echo(); curs_set(TRUE); + memset(ln, 0, sizeof(ln)); getnstr(ln, sizeof(ln) - 1); noecho(); curs_set(FALSE); - return strdup(ln); + return strlen(ln) ? strdup(ln) : NULL; } /*