prevent trying to exec a null char; could potentially happen with a

canceled or empty searchstr.

ok oga@
This commit is contained in:
okan 2008-06-05 04:01:37 +00:00
parent 9005249c59
commit f42ad31e00

View File

@ -149,7 +149,7 @@ menu_filter(struct menu_q *menuq, char *prompt, char *initial, int dummy,
}
}
out:
if (dummy == 0 && mi->dummy) { /* no match */
if ((dummy == 0 && mi->dummy) || (mi->text[0] == '\0')) { /* no match */
xfree (mi);
mi = NULL;
xu_ptr_ungrab();