mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Fix incorrect rgbGen const reading uninitialized memory
If ParseVector fails, color isn't fully set.
This commit is contained in:
parent
0853c85e19
commit
e5f54c584a
2 changed files with 4 additions and 0 deletions
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue