mirror of
https://github.com/fltk/fltk.git
synced 2026-06-05 16:12:13 +08:00
Segfault fixes...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
CHANGES IN FLTK 1.1.0b7
|
CHANGES IN FLTK 1.1.0b7
|
||||||
|
|
||||||
- Some Win32 drivers would draw into wrong buffers
|
|
||||||
after OpenGL mode change
|
|
||||||
- Message handling and Resources for Mac port
|
|
||||||
- More documentation updates...
|
- More documentation updates...
|
||||||
|
- The file chooser would cause a segfault if you
|
||||||
|
clicked in an empty area of the file list.
|
||||||
|
- Fl_File_Icon::labeltype() would cause a segfault
|
||||||
|
if the value pointer was NULL.
|
||||||
|
- Fl_File_Icon::load_image() could cause segfaults
|
||||||
|
(NULL data and incrementing the data pointer too
|
||||||
|
often.)
|
||||||
|
- Some Win32 drivers would draw into wrong buffers
|
||||||
|
after OpenGL mode change.
|
||||||
|
- Message handling and Resources for MacOS port.
|
||||||
- Fl_Help_View could get in an infinitely loop when
|
- Fl_Help_View could get in an infinitely loop when
|
||||||
determining the maximum width of the page; this
|
determining the maximum width of the page; this
|
||||||
was due to a bug in the get_length() method with
|
was due to a bug in the get_length() method with
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $"
|
// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $"
|
||||||
//
|
//
|
||||||
// More Fl_File_Chooser routines.
|
// More Fl_File_Chooser routines.
|
||||||
//
|
//
|
||||||
@@ -424,6 +424,9 @@ Fl_File_Chooser::fileListCB()
|
|||||||
|
|
||||||
|
|
||||||
filename = (char *)fileList->text(fileList->value());
|
filename = (char *)fileList->text(fileList->value());
|
||||||
|
if (!filename)
|
||||||
|
return;
|
||||||
|
|
||||||
if (directory_[0] != '\0')
|
if (directory_[0] != '\0')
|
||||||
snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
|
snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename);
|
||||||
else
|
else
|
||||||
@@ -704,5 +707,5 @@ Fl_File_Chooser::fileNameCB()
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $".
|
// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Icon.cxx,v 1.1.2.5 2001/11/17 15:27:15 easysw Exp $"
|
// "$Id: Fl_File_Icon.cxx,v 1.1.2.6 2001/12/05 00:06:41 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_File_Icon routines.
|
// Fl_File_Icon routines.
|
||||||
//
|
//
|
||||||
@@ -461,11 +461,10 @@ Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data
|
|||||||
(void)a;
|
(void)a;
|
||||||
|
|
||||||
icon = (Fl_File_Icon *)(o->value);
|
icon = (Fl_File_Icon *)(o->value);
|
||||||
|
if (icon) icon->draw(x, y, w, h, (Fl_Color)(o->color));
|
||||||
icon->draw(x, y, w, h, (Fl_Color)(o->color));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.5 2001/11/17 15:27:15 easysw Exp $".
|
// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.6 2001/12/05 00:06:41 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $"
|
// "$Id: Fl_File_Icon2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $"
|
||||||
//
|
//
|
||||||
// Fl_File_Icon system icon routines.
|
// Fl_File_Icon system icon routines.
|
||||||
//
|
//
|
||||||
@@ -333,7 +333,7 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
|
|||||||
|
|
||||||
|
|
||||||
img = Fl_Shared_Image::get(ifile);
|
img = Fl_Shared_Image::get(ifile);
|
||||||
if (!img->w() && !img->h()) return -1;
|
if (!img || !img->count() || !img->w() || !img->h()) return -1;
|
||||||
|
|
||||||
if (img->count() == 1) {
|
if (img->count() == 1) {
|
||||||
int x, y; // X & Y in image
|
int x, y; // X & Y in image
|
||||||
@@ -521,7 +521,6 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
|
|||||||
lineptr = *ptr;
|
lineptr = *ptr;
|
||||||
startx = 0;
|
startx = 0;
|
||||||
ch = bg;
|
ch = bg;
|
||||||
ptr ++;
|
|
||||||
|
|
||||||
for (x = 0; x < img->w(); x ++, lineptr ++)
|
for (x = 0; x < img->w(); x ++, lineptr ++)
|
||||||
if (*lineptr != ch)
|
if (*lineptr != ch)
|
||||||
@@ -924,5 +923,5 @@ get_kde_val(char *str,
|
|||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $".
|
// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user