diff options
author | sin <sin@2f30.org> | 2015-11-20 11:55:41 +0000 |
---|---|---|
committer | sin <sin@2f30.org> | 2015-11-20 11:55:41 +0000 |
commit | 30ca80310aa805aee1e3501da6c6a27812855978 (patch) | |
tree | e1b882e10c43ca6fe4068c8f52d1e390a0192883 /noice.c | |
parent | ea0cce7b6390cab3ba7c16560f50e69322eb89fb (diff) | |
download | noice-30ca80310aa805aee1e3501da6c6a27812855978.tar.gz |
Properly handle empty filters
Diffstat (limited to 'noice.c')
-rw-r--r-- | noice.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } /* |