From 05eb6446d0fc5b304278d6ff0fed5c42e9416b02 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Thu, 7 Dec 2017 12:01:17 +0300 Subject: [PATCH] no message --- src/console.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/console.c b/src/console.c index 2686213..bf9b994 100644 --- a/src/console.c +++ b/src/console.c @@ -1444,8 +1444,8 @@ static void exportSprites(Console* console) Height = TIC_SPRITESHEET_SIZE*2, }; - s32 size = Width * Height * sizeof(gif_color); - u8* buffer = (u8*)SDL_malloc(size); + enum{ Size = Width * Height * sizeof(gif_color)}; + u8* buffer = (u8*)SDL_malloc(Size); if(buffer) { @@ -1457,6 +1457,7 @@ static void exportSprites(Console* console) for (s32 x = 0; x < Width; x++) data[x + y * Width] = getSpritePixel(console->tic->cart.gfx.tiles, x, y); + s32 size = 0; if((size = writeGifData(console->tic, buffer, data, Width, Height))) { // buffer will be freed inside fsGetFileData