mirror of
https://github.com/ioquake/jedi-outcast.git
synced 2024-11-10 07:11:42 +00:00
fix some accesses beyond the end of arrays spotted via clang
This commit is contained in:
parent
c5fceea9f3
commit
583b8948a8
3 changed files with 2 additions and 4 deletions
|
@ -1048,7 +1048,6 @@ static void R_LoadFogs( lump_t *l, lump_t *brushesLump, lump_t *sidesLump ) {
|
||||||
out->parms.color[0] = 0.0f;
|
out->parms.color[0] = 0.0f;
|
||||||
out->parms.color[1] = 0.0f;
|
out->parms.color[1] = 0.0f;
|
||||||
out->parms.color[2] = 0.0f;
|
out->parms.color[2] = 0.0f;
|
||||||
out->parms.color[3] = 0.0f;
|
|
||||||
out->parms.depthForOpaque = 0.0f;
|
out->parms.depthForOpaque = 0.0f;
|
||||||
out->colorInt = 0x00000000;
|
out->colorInt = 0x00000000;
|
||||||
out->tcScale = 0.0f;
|
out->tcScale = 0.0f;
|
||||||
|
|
|
@ -344,9 +344,8 @@ void RE_LAGoggles( void )
|
||||||
fog->parms.color[0] = 0.75f;
|
fog->parms.color[0] = 0.75f;
|
||||||
fog->parms.color[1] = 0.42f + random() * 0.025f;
|
fog->parms.color[1] = 0.42f + random() * 0.025f;
|
||||||
fog->parms.color[2] = 0.07f;
|
fog->parms.color[2] = 0.07f;
|
||||||
fog->parms.color[3] = 1.0f;
|
|
||||||
fog->parms.depthForOpaque = 10000;
|
fog->parms.depthForOpaque = 10000;
|
||||||
fog->colorInt = ColorBytes4(fog->parms.color[0], fog->parms.color[1], fog->parms.color[2], fog->parms.color[3]);
|
fog->colorInt = ColorBytes3(fog->parms.color[0], fog->parms.color[1], fog->parms.color[2]);
|
||||||
fog->tcScale = 2.0f / ( fog->parms.depthForOpaque * (1.0f + cos( tr.refdef.floatTime) * 0.1f));
|
fog->tcScale = 2.0f / ( fog->parms.depthForOpaque * (1.0f + cos( tr.refdef.floatTime) * 0.1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -614,7 +614,7 @@ void RB_CalcColorFromOneMinusEntity( unsigned char *dstColors )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int *pColors = ( int * ) dstColors;
|
int *pColors = ( int * ) dstColors;
|
||||||
unsigned char invModulate[3];
|
unsigned char invModulate[4];
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
if ( !backEnd.currentEntity )
|
if ( !backEnd.currentEntity )
|
||||||
|
|
Loading…
Reference in a new issue