Fix bug with searching "" pattern, cause 'more' always shows

next line on "/<Enter>" instead of searching next pattern
This commit is contained in:
Andrey A. Chernov 1994-09-14 21:35:31 +00:00
parent dea246f55a
commit a5b8a93b59

View File

@ -59,7 +59,7 @@ char *
re_comp(s)
char *s;
{
if (s == NULL)
if (s == NULL || *s == '\0')
return (NULL);
if (re_regexp)
free(re_regexp);