summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-10-29 11:20:36 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2013-10-29 11:20:36 (GMT)
commit4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036 (patch)
treefb29f4172abdd106c7a9398632a1cd53f45d11cd
parent06881b9f188aad6b2e928ac284fd5d0ac33d9b0d (diff)
downloadlibnsfb-4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036.tar.gz
libnsfb-4694cd4f5c1dc6d3cac3eee8c13c35f6394f6036.tar.bz2
Set unused param in SDL_Color struct, to avoid valgrind uninitialised values from within SDL_BlitSurface.
-rw-r--r--src/surface/sdl.c1
1 files changed, 1 insertions, 0 deletions
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 */