initialize a variable; kill a bug

This commit is contained in:
Jonathan Blandford 1999-11-03 16:40:43 +00:00
parent 5a3e3916f5
commit 66bf26d42d

View File

@ -137,10 +137,11 @@ struct _GifContext
gint lwz_oldcode; gint lwz_oldcode;
gint lwz_clear_code; gint lwz_clear_code;
gint lwz_end_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_sp;
gint lwz_table[2][(1 << MAX_LWZ_BITS)];
gint lwz_stack[(1 << (MAX_LWZ_BITS)) * 2 + 1];
/* painting context */ /* painting context */
gint draw_xpos; gint draw_xpos;
gint draw_ypos; gint draw_ypos;
@ -150,9 +151,11 @@ struct _GifContext
static int GetDataBlock (GifContext *, unsigned char *); static int GetDataBlock (GifContext *, unsigned char *);
static int GetCode (GifContext *, int); static int GetCode (GifContext *, int);
#define IO_GIFDEBUG
static int count = 0;
/* Returns TRUE if Read is OK, /* Returns TRUE if Read is OK,
* FALSE if more memory is needed. */ * FALSE if more memory is needed. */
static int count = 0;
static int static int
ReadOK (GifContext *context, guchar *buffer, size_t len) ReadOK (GifContext *context, guchar *buffer, size_t len)
{ {
@ -748,6 +751,7 @@ gif_prepare_lzw (GifContext *context)
context->lwz_fresh = TRUE; context->lwz_fresh = TRUE;
context->code_curbit = 0; context->code_curbit = 0;
context->code_lastbit = 0; context->code_lastbit = 0;
context->code_last_byte = 0;
context->code_done = FALSE; context->code_done = FALSE;
for (i = 0; i < context->lwz_clear_code; ++i) { for (i = 0; i < context->lwz_clear_code; ++i) {