Fix NULL argument to fl_filename_name()...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2056 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ed45695bf5
commit
6fa4abfe54
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.1.0b13
|
||||
|
||||
- The fl_filename_name() function didn't handle a NULL
|
||||
input string.
|
||||
- The input field used by the fl_input() and
|
||||
fl_password() functions was resized too small in
|
||||
1.1.0b12.
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_mac.cxx,v 1.1.2.17 2002/03/26 17:35:18 easysw Exp $"
|
||||
// "$Id: Fl_mac.cxx,v 1.1.2.18 2002/04/07 18:31:55 easysw Exp $"
|
||||
//
|
||||
// MacOS specific code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -1166,6 +1166,7 @@ void Fl_Window::size_range_() {
|
||||
const char *fl_filename_name( const char *name )
|
||||
{
|
||||
const char *p, *q;
|
||||
if (!name) return (0);
|
||||
for ( p = q = name ; *p ; )
|
||||
{
|
||||
if ( ( p[0] == ':' ) && ( p[1] == ':' ) )
|
||||
@ -1358,6 +1359,6 @@ void Fl::paste(Fl_Widget &receiver, int clipboard) {
|
||||
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_mac.cxx,v 1.1.2.17 2002/03/26 17:35:18 easysw Exp $".
|
||||
// End of "$Id: Fl_mac.cxx,v 1.1.2.18 2002/04/07 18:31:55 easysw Exp $".
|
||||
//
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.22 2002/03/25 21:08:41 easysw Exp $"
|
||||
// "$Id: Fl_win32.cxx,v 1.33.2.37.2.23 2002/04/07 18:31:55 easysw Exp $"
|
||||
//
|
||||
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -1067,6 +1067,7 @@ void Fl_X::set_minmax(LPMINMAXINFO minmax)
|
||||
// returns pointer to the filename, or null if name ends with '/'
|
||||
const char *fl_filename_name(const char *name) {
|
||||
const char *p,*q;
|
||||
if (!name) return (0);
|
||||
q = name;
|
||||
if (q[0] && q[1]==':') q += 2; // skip leading drive letter
|
||||
for (p = q; *p; p++) if (*p == '/' || *p == '\\') q = p+1;
|
||||
@ -1156,5 +1157,5 @@ void Fl_Window::make_current() {
|
||||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.22 2002/03/25 21:08:41 easysw Exp $".
|
||||
// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.23 2002/04/07 18:31:55 easysw Exp $".
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// "$Id: Fl_x.cxx,v 1.24.2.24.2.16 2002/03/26 17:37:42 easysw Exp $"
|
||||
// "$Id: Fl_x.cxx,v 1.24.2.24.2.17 2002/04/07 18:31:55 easysw Exp $"
|
||||
//
|
||||
// X specific code for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
@ -1149,6 +1149,7 @@ void Fl_Window::size_range_() {
|
||||
// returns pointer to the filename, or null if name ends with '/'
|
||||
const char *fl_filename_name(const char *name) {
|
||||
const char *p,*q;
|
||||
if (!name) return (0);
|
||||
for (p=q=name; *p;) if (*p++ == '/') q = p;
|
||||
return q;
|
||||
}
|
||||
@ -1215,5 +1216,5 @@ void Fl_Window::make_current() {
|
||||
#endif
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.16 2002/03/26 17:37:42 easysw Exp $".
|
||||
// End of "$Id: Fl_x.cxx,v 1.24.2.24.2.17 2002/04/07 18:31:55 easysw Exp $".
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user