* (bug 3610) Server sending unnecessary newline with SV_ConSay_F (Tyler Schwend
<TylerSchwend@gmail.com>) * (bug 3623) COMMAND is mapped to the ALT key (Matthias <Kapffer@macbay.de>) * (bug 3665) Typo error in FS_FOpenFileByMode function (TsT <tst2006@gmail.com>) * (bug 3669) Some files left out of Solaris Packages (Vincent Cojot <vincent@cojot.name>) * (bug 3680) server quit messages (Ben Millwood) * (bug 3682) Maps with >1024 models cause a segfault (misantropia <bnoordhuis@gmail.com>) * (bug 3683) R_FindShader(): negative lightmap indexes cause stray pointers (misantropia <bnoordhuis@gmail.com>) * (bug 3688) q3asm potential segfault fix and other changes (TsT <tst2006@gmail.com>) * (bug 3695) Not allowing to write file with lib extention (.dll/.so/...) (TsT <tst2006@gmail.com>) * (bug 3696) make-macosx-ub.sh outdated by revision 1340; test for Tiger not working (Matthias <Kapffer@macbay.de>) * (bug 3698) #error reported as warning in q3cpp (and no #warning support) (Ben Millwood) * (bug 3703) restoring the valued pre-SDL window behaviour (/dev/humancontroller <devhc97@gmail.com>)
This commit is contained in:
parent
956ce9bf12
commit
2c0861c1ce
13 changed files with 145 additions and 73 deletions
|
@ -1432,7 +1432,6 @@ static qboolean ParseShader( char **text )
|
|||
// stage definition
|
||||
else if ( token[0] == '{' )
|
||||
{
|
||||
// 20051019 misantropia -- fix buffer overrun.
|
||||
if ( s >= MAX_SHADER_STAGES ) {
|
||||
ri.Printf( PRINT_WARNING, "WARNING: too many stages in shader %s\n", shader.name );
|
||||
return qfalse;
|
||||
|
@ -2447,6 +2446,10 @@ shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImag
|
|||
// lightmaps
|
||||
if ( lightmapIndex >= 0 && lightmapIndex >= tr.numLightmaps ) {
|
||||
lightmapIndex = LIGHTMAP_BY_VERTEX;
|
||||
} else if ( lightmapIndex < LIGHTMAP_2D ) {
|
||||
// negative lightmap indexes cause stray pointers (think tr.lightmaps[lightmapIndex])
|
||||
ri.Printf( PRINT_WARNING, "WARNING: shader '%s' has invalid lightmap index of %d\n", name, lightmapIndex );
|
||||
lightmapIndex = LIGHTMAP_BY_VERTEX;
|
||||
}
|
||||
|
||||
COM_StripExtension(name, strippedName, sizeof(strippedName));
|
||||
|
@ -2581,7 +2584,7 @@ qhandle_t RE_RegisterShaderFromImage(const char *name, int lightmapIndex, image_
|
|||
|
||||
hash = generateHashValue(name, FILE_HASH_SIZE);
|
||||
|
||||
// 20051020 misantropia -- probably not necessary since this function
|
||||
// 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 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue