summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_shader.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2014-08-27 20:27:30 -0500
committerTim Angus <tim@ngus.net>2014-08-28 11:20:30 +0100
commit1e7a9c1eaf163fb982753b0b75e70f0e2db37f81 (patch)
treecc8430d7f597a1dc84dc8deda084246f7c11241e /src/renderergl2/tr_shader.c
parentff17beb99998392e9f00bd50487966ae2dccf6f3 (diff)
Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
Diffstat (limited to 'src/renderergl2/tr_shader.c')
-rw-r--r--src/renderergl2/tr_shader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c
index 1c7e452c..9b0e64bb 100644
--- a/src/renderergl2/tr_shader.c
+++ b/src/renderergl2/tr_shader.c
@@ -1092,6 +1092,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
{
vec3_t color;
+ VectorClear( color );
+
ParseVector( text, 3, color );
stage->constantColor[0] = 255 * color[0];
stage->constantColor[1] = 255 * color[1];