From: Pierre Joye Date: Wed, 26 Jul 2006 10:03:09 +0000 (+0000) Subject: - #38214, gif interlace never works X-Git-Tag: php-5.2.0RC2~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc11170217439211fe8804562a4b89ebd47810fe;p=php - #38214, gif interlace never works --- diff --git a/ext/gd/libgd/gd_gif_out.c b/ext/gd/libgd/gd_gif_out.c index 651df90d4f..1fe36880a4 100644 --- a/ext/gd/libgd/gd_gif_out.c +++ b/ext/gd/libgd/gd_gif_out.c @@ -264,10 +264,12 @@ GIFEncode(gdIOCtxPtr fp, int GWidth, int GHeight, int GInterlace, int Background int ColorMapSize; int InitCodeSize; int i; - GifCtx ctx; + GifCtx ctx; + + memset(&ctx, 0, sizeof(ctx)); ctx.Interlace = GInterlace; - ctx.in_count = 1; - memset(&ctx, 0, sizeof(ctx)); + ctx.in_count = 1; + ColorMapSize = 1 << BitsPerPixel; RWidth = ctx.Width = GWidth;