summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2016-03-14 17:09:46 +0000
committerGreg Ercolano <erco@seriss.com>2016-03-14 17:09:46 +0000
commitaeaf3b1586e7581e4962a8a4eb946e24292b577d (patch)
tree428316cedb50c82c5ae139b244093d41a71b795d
parent5c3c42f464d05b4e1885a512ed02bb7c5a79a373 (diff)
Carrying fix from 1.3-current (r11177) to the new porting branch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11361 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Tree.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx
index 139e8ed6d..9c8bc9365 100644
--- a/src/Fl_Tree.cxx
+++ b/src/Fl_Tree.cxx
@@ -1228,8 +1228,8 @@ int Fl_Tree::item_pathname(char *pathname, int pathnamelen, const Fl_Tree_Item *
SAFE_RCAT('/'); // rcat leading slash
item = item->parent(); // move up tree (NULL==root)
}
- if ( *(++s) == '/' ) ++s; // leave off leading slash from pathname
- if ( s != pathname ) memmove(pathname, s, slen); // Shift down right-aligned string
+ if ( *(++s) == '/' ) { ++s; --slen; } // leave off leading slash from pathname
+ if ( s != pathname ) memmove(pathname, s, slen); // Shift down right-aligned string
return(0);
}