From c6e6092657a0931b17d4b93d284f3fd20296b759 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 7 Oct 2007 10:12:32 +0000 Subject: [PATCH] STR #1761: fixed fl_filename_isdir for '/'-path in Unix git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5948 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + src/filename_isdir.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 4115bc731..a7815f8e2 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ CHANGES IN FLTK 1.1.8 - Documentation fixes (STR #1454, STR #1455, STR #1456, STR #1457, STR #1458, STR #1460, STR #1481, STR #1578, STR #1639, STR #1645, STR #1644, STR #1792, STR #1793) + - Fixed fl_filename_isdir for "/"-path (STR #1761) - Fixed Fl_Chart drawing (STR #1756) - Fixed mapping of subwindows with unmapped parent windows (STR #1706) 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';