From 4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 29 Oct 2013 11:20:36 +0000 Subject: Set unused param in SDL_Color struct, to avoid valgrind uninitialised values from within SDL_BlitSurface. --- src/surface/sdl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/surface/sdl.c b/src/surface/sdl.c index 48052a8..82e36f8 100644 --- a/src/surface/sdl.c +++ b/src/surface/sdl.c @@ -363,6 +363,7 @@ set_palette(nsfb_t *nsfb) palette[loop].r = (nsfb->palette->data[loop] ) & 0xFF; palette[loop].g = (nsfb->palette->data[loop] >> 8) & 0xFF; palette[loop].b = (nsfb->palette->data[loop] >> 16) & 0xFF; + palette[loop].unused = 0; /* Suppress valgrind uninitialised values */ } /* Set SDL palette */ -- cgit v1.2.3