diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-20 01:23:17 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-20 01:23:17 +0000 |
commit | b8dbaee591491f9336b57a996374989361651c61 (patch) | |
tree | 59c59f0e8baac2a2bff4e2c0f235aba02b55f557 /code | |
parent | 59df9eeac4a931c45b190a304f2fbba42690aeab (diff) | |
download | ioquake3-aero-b8dbaee591491f9336b57a996374989361651c61.tar.gz ioquake3-aero-b8dbaee591491f9336b57a996374989361651c61.zip |
* Fixed the fix for the shader overrun. If this isn't a case for unified diffs,
I don't know what is :).
git-svn-id: svn://svn.icculus.org/quake3/trunk@168 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/renderer/tr_shader.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/code/renderer/tr_shader.c b/code/renderer/tr_shader.c index f896f31..7e9a37e 100644 --- a/code/renderer/tr_shader.c +++ b/code/renderer/tr_shader.c @@ -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 |