Fix handling of a trailing "\" in Fl_Menu_::add()...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2643 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-10-01 18:37:27 +00:00
parent fcd05e51c5
commit 5fe1f6c1ec
2 changed files with 5 additions and 3 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0
- Fl_Menu_:add() didn't handle a trailing "\" character
gracefully.
- Clicking/dragging the middle mouse button in a
scrollbar now moves directly to that scroll position,
matching the behavior of other toolkits.
+3 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.4 2002/08/09 01:09:49 easysw Exp $"
// "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.5 2002/10/01 18:37:27 easysw Exp $"
//
// Menu utilities for the Fast Light Tool Kit (FLTK).
//
@@ -125,7 +125,7 @@ int Fl_Menu_Item::add(
// copy to buf, changing \x to x:
q = buf;
for (p=mytext; *p && *p != '/'; *q++ = *p++) if (*p=='\\') p++;
for (p=mytext; *p && *p != '/'; *q++ = *p++) if (*p=='\\' && p[1]) p++;
*q = 0;
item = buf;
@@ -262,5 +262,5 @@ void Fl_Menu_::remove(int i) {
}
//
// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.4 2002/08/09 01:09:49 easysw Exp $".
// End of "$Id: Fl_Menu_add.cxx,v 1.9.2.13.2.5 2002/10/01 18:37:27 easysw Exp $".
//