diff --git a/examples/gifdec.c b/examples/gifdec.c index 4d246d5f..d04ed8d9 100644 --- a/examples/gifdec.c +++ b/examples/gifdec.c @@ -87,8 +87,7 @@ static void Remap(const GifFileType* const gif, const uint8_t* const src, const GifColorType* colors; const ColorMapObject* const cmap = gif->Image.ColorMap ? gif->Image.ColorMap : gif->SColorMap; - if (cmap == NULL || cmap->Colors == NULL) return; - if (len > cmap->ColorCount) len = cmap->ColorCount; + if (cmap == NULL) return; colors = cmap->Colors; for (i = 0; i < len; ++i) {