summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/filename_isdir.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filename_isdir.cxx b/src/filename_isdir.cxx
index 5d58911d8..a8751673d 100644
--- a/src/filename_isdir.cxx
+++ b/src/filename_isdir.cxx
@@ -75,7 +75,7 @@ int fl_filename_isdir(const char* n) {
// Matt: Just in case, we strip the slash for other operating
// systems as well, avoid bugs by sloppy implementations
// of "stat".
- if (length > 0 && isdirsep(n[length - 1])) {
+ if (length > 1 && isdirsep(n[length - 1])) {
length --;
memcpy(fn, n, length);
fn[length] = '\0';