summaryrefslogtreecommitdiff
path: root/src/Fl_GIF_Image.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-11-24 02:46:19 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-11-24 02:46:19 +0000
commit70abac1b8b995dc78ec312eb52f8724161b11b75 (patch)
tree4bf4d24e190a2a49e98c8fe3fdbecabe8c9cd2fa /src/Fl_GIF_Image.cxx
parent4087b8cd9a139664420468c57489cae73c8b830a (diff)
Fix bugs in copy() methods.
Add Fl_Shared_Image class, with get() and release() methods. Update Fl_Help_View to use Fl_Shared_Image class. Update image demo to accept a filename, and to use the Fl_Shared_Image class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1714 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_GIF_Image.cxx')
-rw-r--r--src/Fl_GIF_Image.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx
index 36022cc72..51cbcff70 100644
--- a/src/Fl_GIF_Image.cxx
+++ b/src/Fl_GIF_Image.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_GIF_Image.cxx,v 1.1.2.3 2001/11/22 15:35:01 easysw Exp $"
+// "$Id: Fl_GIF_Image.cxx,v 1.1.2.4 2001/11/24 02:46:19 easysw Exp $"
//
// Fl_GIF_Image routines.
//
@@ -353,8 +353,9 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
// split the image data into lines:
for (i=0; i<Height; i++) {
- new_data[i+2] = new char[Width];
+ new_data[i+2] = new char[Width+1];
memcpy(new_data[i + 2], (char*)(Image + i*Width), Width);
+ new_data[i + 2][Width] = 0;
}
data(new_data, Height + 2);
@@ -365,5 +366,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
//
-// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.3 2001/11/22 15:35:01 easysw Exp $".
+// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.4 2001/11/24 02:46:19 easysw Exp $".
//