From 66bf26d42d9f6caa337451ceed099688abb5fc68 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 3 Nov 1999 16:40:43 +0000 Subject: [PATCH] initialize a variable; kill a bug --- gdk-pixbuf/io-gif.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index 3ba2b00c4e..e1667366dc 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -137,10 +137,11 @@ struct _GifContext gint lwz_oldcode; gint lwz_clear_code; gint lwz_end_code; - gint lwz_table[2][(1 << MAX_LWZ_BITS)]; - gint lwz_stack[(1 << (MAX_LWZ_BITS)) * 2]; gint *lwz_sp; + gint lwz_table[2][(1 << MAX_LWZ_BITS)]; + gint lwz_stack[(1 << (MAX_LWZ_BITS)) * 2 + 1]; + /* painting context */ gint draw_xpos; gint draw_ypos; @@ -150,9 +151,11 @@ struct _GifContext static int GetDataBlock (GifContext *, unsigned char *); static int GetCode (GifContext *, int); +#define IO_GIFDEBUG + +static int count = 0; /* Returns TRUE if Read is OK, * FALSE if more memory is needed. */ -static int count = 0; static int ReadOK (GifContext *context, guchar *buffer, size_t len) { @@ -748,6 +751,7 @@ gif_prepare_lzw (GifContext *context) context->lwz_fresh = TRUE; context->code_curbit = 0; context->code_lastbit = 0; + context->code_last_byte = 0; context->code_done = FALSE; for (i = 0; i < context->lwz_clear_code; ++i) {