Properly handle empty filters

This commit is contained in:
sin 2015-11-20 11:55:41 +00:00
parent ea0cce7b63
commit 30ca80310a

View file

@ -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;
}
/*