Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
This commit is contained in:
1 parent
0853c85e19
commit
e5f54c584a
2 files changed
+4
No files matched your search
@@ -847,6 +847,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
|||||||
{
|
{
|
||||||
vec3_t color;
|
vec3_t color;
|
||||||
|
|
||||||
|
VectorClear( color );
|
||||||
|
|
||||||
ParseVector( text, 3, color );
|
ParseVector( text, 3, color );
|
||||||
stage->constantColor[0] = 255 * color[0];
|
stage->constantColor[0] = 255 * color[0];
|
||||||
stage->constantColor[1] = 255 * color[1];
|
stage->constantColor[1] = 255 * color[1];
|
||||||
|
|||||||
@@ -1091,6 +1091,8 @@ static qboolean ParseStage( shaderStage_t *stage, char **text )
|
|||||||
{
|
{
|
||||||
vec3_t color;
|
vec3_t color;
|
||||||
|
|
||||||
|
VectorClear( color );
|
||||||
|
|
||||||
ParseVector( text, 3, color );
|
ParseVector( text, 3, color );
|
||||||
stage->constantColor[0] = 255 * color[0];
|
stage->constantColor[0] = 255 * color[0];
|
||||||
stage->constantColor[1] = 255 * color[1];
|
stage->constantColor[1] = 255 * color[1];
|
||||||
|
|||||||
Reference in new issue
Block a user