summaryrefslogtreecommitdiff
path: root/src/Fl_GIF_Image.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-01-07 20:40:02 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-01-07 20:40:02 +0000
commitbccdafdaef5fdf69628984d8f6953145bc831a53 (patch)
tree8e2edbab6fedf1893463a8b4b8f69f8643082f3a /src/Fl_GIF_Image.cxx
parenta55363086d594e4df9573144b493da87b667fd27 (diff)
Fixed from Teun.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_GIF_Image.cxx')
-rw-r--r--src/Fl_GIF_Image.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx
index 2c518f9e8..5bd20d37e 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.9 2002/01/01 15:11:30 easysw Exp $"
+// "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $"
//
// Fl_GIF_Image routines.
//
@@ -173,7 +173,8 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
Interlace = ((ch & 0x40) != 0);
if (ch&0x80) {
// read local color map
- int n = 1<<((ch&7)+1); // does this replace ColorMapSize ??
+ int n = 2<<(ch&7);
+ if (n > ColorMapSize) ColorMapSize = n;
for (i=0; i < n; i++) {
Red[i] = NEXTBYTE;
Green[i] = NEXTBYTE;
@@ -261,7 +262,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];}
*tp++ = FinChar = i;
- while (tp > OutCode) {
+ do {
*p++ = *--tp;
if (p >= eol) {
if (!Interlace) YC++;
@@ -275,7 +276,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) {
p = Image + YC*Width;
eol = p+Width;
}
- }
+ } while (tp > OutCode);
if (OldCode != ClearCode) {
Prefix[FreeCode] = OldCode;
@@ -373,5 +374,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.9 2002/01/01 15:11:30 easysw Exp $".
+// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.10 2002/01/07 20:40:02 easysw Exp $".
//