From fee5076031accfba7dbb91e0a6fa740909a97d4a Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 5 Mar 2015 10:53:02 +0000 Subject: [PATCH] Accessing invalid palette colors now access black. Was uninitialized before. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12199 d7cf8633-e32d-0410-b094-e92efae38249 --- image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image.c b/image.c index 58f7c053..d72ceca7 100644 --- a/image.c +++ b/image.c @@ -436,6 +436,8 @@ unsigned char *LoadTGA_BGRA (const unsigned char *f, int filesize, int *miplevel return NULL; } + memset(palettei, 0, sizeof(palettei)); + // advance to end of header fin = f + 18; -- 2.39.2