From 1348faa209fa1d331d82b8ac5e838a5816d60839 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 3 Feb 2021 11:01:36 +0100 Subject: [PATCH] (RTGA) Lower raw_data size to 18 bytes and leave behind a comment --- libretro-common/formats/tga/rtga.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libretro-common/formats/tga/rtga.c b/libretro-common/formats/tga/rtga.c index 456dcdb6a6..ff429fb240 100644 --- a/libretro-common/formats/tga/rtga.c +++ b/libretro-common/formats/tga/rtga.c @@ -266,7 +266,9 @@ static uint8_t *rtga_tga_load(rtga_context *s, int RLE_repeating = 0; int RLE_count = 0; int read_next_pixel = 1; - unsigned char raw_data[32] = {0}; + /* Needs to be at least 18 bytes to silence a GCC warning, + * only 4 are actually used */ + unsigned char raw_data[18] = {0}; unsigned char *tga_palette = NULL; /* Do I need to load a palette? */