]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Accessing invalid palette colors now access black.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 10:53:02 +0000 (10:53 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 5 Mar 2015 10:53:02 +0000 (10:53 +0000)
Was uninitialized before.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12199 d7cf8633-e32d-0410-b094-e92efae38249

image.c

diff --git a/image.c b/image.c
index 58f7c053234b58f1de69363ef0618389a1887fe9..d72ceca744644700e558808c08a4dd86dc1fbd85 100644 (file)
--- 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;