* Fixed the fix for the shader overrun. If this isn't a case for unified diffs,

I don't know what is :).
This commit is contained in:
Tim Angus 2005-10-20 01:23:17 +00:00
parent b9c9f86cd1
commit 653c5621ac

View file

@ -1432,6 +1432,12 @@ static qboolean ParseShader( char **text )
// stage definition
else if ( token[0] == '{' )
{
// 20051019 misantropia -- fix buffer overrun.
if ( s >= MAX_SHADER_STAGES ) {
ri.Printf( PRINT_WARNING, "WARNING: too many stages in shader %s\n", shader.name );
return qfalse;
}
if ( !ParseStage( &stages[s], text ) )
{
return qfalse;
@ -1439,12 +1445,6 @@ static qboolean ParseShader( char **text )
stages[s].active = qtrue;
s++;
// 20051019 misantropia -- fix buffer overrun.
if ( s >= MAX_SHADER_STAGES ) {
ri.Printf( PRINT_WARNING, "WARNING: too many stages in shader %s\n", shader.name );
return qfalse;
}
continue;
}
// skip stuff that only the QuakeEdRadient needs