summaryrefslogtreecommitdiff
path: root/src/renderergl1/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/renderergl1/tr_shader.c
parentff17beb99998392e9f00bd50487966ae2dccf6f3 (diff)
Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
Diffstat (limited to 'src/renderergl1/tr_shader.c')
-rw-r--r--src/renderergl1/tr_shader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/renderergl1/tr_shader.c b/src/renderergl1/tr_shader.c
index c44925a8..1408902d 100644
--- a/src/renderergl1/tr_shader.c
+++ b/src/renderergl1/tr_shader.c
@@ -848,6 +848,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];