mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-03-04 15:21:00 +00:00
* Fix to potential out of range index bug from misanthropia
This commit is contained in:
parent
769372e2f9
commit
64f167f183
1 changed files with 8 additions and 1 deletions
|
@ -2567,6 +2567,13 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_
|
|||
|
||||
hash = generateHashValue(name, FILE_HASH_SIZE);
|
||||
|
||||
// 20051020 misantropia -- probably not necessary since this function
|
||||
// only gets called from tr_font.c with lightmapIndex == LIGHTMAP_2D
|
||||
// but better safe than sorry.
|
||||
if ( lightmapIndex >= tr.numLightmaps ) {
|
||||
lightmapIndex = LIGHTMAP_WHITEIMAGE;
|
||||
}
|
||||
|
||||
//
|
||||
// see if the shader is already loaded
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue