From 2013c162af618e701ba4caf84fa304ac38c92501 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 1 Dec 2021 17:23:01 +0000 Subject: GIF: Scope reduce frame interlace mask. --- src/gif.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gif.c b/src/gif.c index 74fe4f4..cfd5278 100644 --- a/src/gif.c +++ b/src/gif.c @@ -52,7 +52,6 @@ enum nsgif_disposal { }; /* GIF Flags */ -#define NSGIF_INTERLACE_MASK 0x40 #define NSGIF_COLOUR_TABLE_MASK 0x80 #define NSGIF_COLOUR_TABLE_SIZE_MASK 0x07 #define NSGIF_BLOCK_TERMINATOR 0x00 @@ -497,12 +496,16 @@ static inline nsgif_result nsgif__decode( const uint8_t *data, uint32_t *restrict frame_data) { + enum { + GIF_MASK_INTERLACE = 0x40, + }; + nsgif_result ret; uint32_t offset_x = frame->redraw_x; uint32_t offset_y = frame->redraw_y; uint32_t width = frame->redraw_width; uint32_t height = frame->redraw_height; - uint32_t interlace = frame->flags & NSGIF_INTERLACE_MASK; + uint32_t interlace = frame->flags & GIF_MASK_INTERLACE; uint32_t transparency_index = frame->transparency_index; uint32_t *restrict colour_table = gif->colour_table; -- cgit v1.2.1