From 6845781a3ba7dd377724005c01cd7e444430b1bf Mon Sep 17 00:00:00 2001 From: tildearrow Date: Mon, 1 Apr 2024 02:34:28 -0500 Subject: [PATCH] fix realloc with size 0 --- src/gui/gif_load.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/gif_load.h b/src/gui/gif_load.h index d08e66dc4..1730f610c 100644 --- a/src/gui/gif_load.h +++ b/src/gui/gif_load.h @@ -35,7 +35,7 @@ extern "C" { #include /** imports uint8_t, uint16_t and uint32_t **/ #ifndef GIF_MGET #include - #define GIF_MGET(m,s,a,c) m = (uint8_t*)realloc((c)? 0 : m, (c)? s : 0UL); + #define GIF_MGET(m,s,a,c) m = (uint8_t*)realloc((c)? 0 : m, (c)? s : 1UL); #endif #ifndef GIF_BIGE #define GIF_BIGE 0