aboutsummaryrefslogtreecommitdiffstats
path: root/indep.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--indep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/indep.c b/indep.c
index d935b54..2842677 100644
--- a/indep.c
+++ b/indep.c
@@ -1,4 +1,4 @@
-/* $Id: indep.c,v 1.10 2001/11/26 09:01:08 ukai Exp $ */
+/* $Id: indep.c,v 1.11 2001/11/26 09:04:01 ukai Exp $ */
#include "fm.h"
#include <stdio.h>
#include <pwd.h>
@@ -177,6 +177,8 @@ strcasestr(const char *s1, const char *s2)
int len1, len2;
if (s2 == NULL)
return (char *)s1;
+ if (*s2 == '\0')
+ return (char *)s1;
len1 = strlen(s1);
len2 = strlen(s2);
while (*s1 && len1 >= len2) {