Fix this bug in a better way.

This commit is contained in:
Thilo Schulz 2011-01-22 01:13:30 +00:00
parent fdb66505bf
commit b0a753eb0f

View file

@ -2327,14 +2327,15 @@ static char *FindShaderInShaderText( const char *shadername ) {
hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH); hash = generateHashValue(shadername, MAX_SHADERTEXT_HASH);
if(!shaderTextHashTable[hash]) if(shaderTextHashTable[hash])
return NULL; {
for (i = 0; shaderTextHashTable[hash][i]; i++)
for (i = 0; shaderTextHashTable[hash][i]; i++) { {
p = shaderTextHashTable[hash][i]; p = shaderTextHashTable[hash][i];
token = COM_ParseExt(&p, qtrue); token = COM_ParseExt(&p, qtrue);
if ( !Q_stricmp( token, shadername ) ) {
return p; if(!Q_stricmp(token, shadername))
return p;
} }
} }