mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-24 05:01:40 +00:00
Fix this bug in a better way.
This commit is contained in:
parent
fdb66505bf
commit
b0a753eb0f
1 changed files with 9 additions and 8 deletions
|
@ -2327,14 +2327,15 @@ static char *FindShaderInShaderText( const char *shadername ) {
|
|||
|
||||
hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH);
|
||||
|
||||
if(!shaderTextHashTable[hash])
|
||||
return NULL;
|
||||
|
||||
for (i = 0; shaderTextHashTable[hash][i]; i++) {
|
||||
p = shaderTextHashTable[hash][i];
|
||||
token = COM_ParseExt(&p, qtrue);
|
||||
if ( !Q_stricmp( token, shadername ) ) {
|
||||
return p;
|
||||
if(shaderTextHashTable[hash])
|
||||
{
|
||||
for (i = 0; shaderTextHashTable[hash][i]; i++)
|
||||
{
|
||||
p = shaderTextHashTable[hash][i];
|
||||
token = COM_ParseExt(&p, qtrue);
|
||||
|
||||
if(!Q_stricmp(token, shadername))
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue