From: divverent Date: Thu, 5 Mar 2015 10:53:02 +0000 (+0000) Subject: Accessing invalid palette colors now access black. X-Git-Tag: xonotic-v0.8.1~8^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fee5076031accfba7dbb91e0a6fa740909a97d4a;p=xonotic%2Fdarkplaces.git 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 --- 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;