aboutsummaryrefslogtreecommitdiff
path: root/lib/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lib.c')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index fe15c990..b5825fd2 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -1046,7 +1046,7 @@ char *getdirname(char *name)
{
char *s = xstrdup(name), *ss = strrchr(s, '/');
- while (*ss && *ss == '/' && s != ss) *ss-- = 0;
+ while (ss && *ss && *ss == '/' && s != ss) *ss-- = 0;
return s;
}