fix some accesses beyond the end of arrays spotted via clang

This commit is contained in:
Jonathan Gray 2013-04-26 16:28:34 +10:00
parent 0ad40e0b6d
commit 1660a3ca25
3 changed files with 2 additions and 4 deletions

View File

@ -592,7 +592,6 @@ public:
float& pitch() {return v[0];}
float& yaw() {return v[1];}
float& roll() {return v[2];}
float& radius() {return v[3];}
////////////////////////////////////////////////////////////////////////////////////
// Equality / Inequality Operators
@ -999,4 +998,4 @@ public:
//};
#endif
#endif

View File

@ -1771,7 +1771,6 @@ static void R_LoadFogs( lump_t *l, lump_t *brushesLump, lump_t *sidesLump, world
out->parms.color[0] = 1.0f;
out->parms.color[1] = 0.0f;
out->parms.color[2] = 0.0f;
out->parms.color[3] = 0.0f;
out->parms.depthForOpaque = 250.0f;
}
else

View File

@ -692,7 +692,7 @@ void RB_CalcColorFromOneMinusEntity( unsigned char *dstColors )
{
int i;
int *pColors = ( int * ) dstColors;
unsigned char invModulate[3];
unsigned char invModulate[4];
int c;
if ( !backEnd.currentEntity )