mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fix stage being written past the limit (#716)
This commit is contained in:
parent
c1efc0e066
commit
f2a6278daa
1 changed files with 7 additions and 1 deletions
|
@ -3135,7 +3135,13 @@ static shader_t *FinishShader( void ) {
|
|||
// set appropriate stage information
|
||||
//
|
||||
stage = 0;
|
||||
for (shaderStage_t* pStage = &unfoggedStages[0]; pStage->active; pStage++, stage++) {
|
||||
for ( stage = 0; stage < MAX_SHADER_STAGES; stage++ ) {
|
||||
shaderStage_t *pStage = &unfoggedStages[stage];
|
||||
|
||||
if ( !pStage->active ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// check for a missing texture
|
||||
if ( !pStage->bundle[0].image[0] ) {
|
||||
ri.Printf( PRINT_WARNING, "Shader %s has a stage with no image\n", shader.name );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue