mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-23 20:52:54 +00:00
* Fix to buffer overflow in lightmap loading code from misanthropia
This commit is contained in:
parent
653c5621ac
commit
769372e2f9
1 changed files with 4 additions and 1 deletions
|
@ -155,6 +155,9 @@ static void R_LoadLightmaps( lump_t *l ) {
|
|||
//FIXME: HACK: maps with only one lightmap turn up fullbright for some reason.
|
||||
//this avoids this, but isn't the correct solution.
|
||||
tr.numLightmaps++;
|
||||
} else if ( tr.numLightmaps >= MAX_LIGHTMAPS ) { // 20051020 misantropia
|
||||
ri.Printf( PRINT_WARNING, "WARNING: number of lightmaps > MAX_LIGHTMAPS\n" );
|
||||
tr.numLightmaps = MAX_LIGHTMAPS;
|
||||
}
|
||||
|
||||
// if we are in r_vertexLight mode, we don't need the lightmaps at all
|
||||
|
|
Loading…
Reference in a new issue