diff options
Diffstat (limited to 'lib/lib.c')
-rw-r--r-- | lib/lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |