mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 04:12:39 +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
|
@ -2566,7 +2566,14 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_
|
||||||
shader_t *sh;
|
shader_t *sh;
|
||||||
|
|
||||||
hash = generateHashValue(name, FILE_HASH_SIZE);
|
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
|
// see if the shader is already loaded
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue