Catch more bad shader syntax cases
Use to only ignore file in cases where both { and \0 were missing after shader name. Now ignore file when either are missing, such as "}\0".
This commit is contained in:
@@ -2955,7 +2955,7 @@ static void ScanAndLoadShaderFiles( void )
|
||||
oldp = p;
|
||||
|
||||
token = COM_ParseExt(&p, qtrue);
|
||||
if(token[0] != '{' && token[1] != '\0')
|
||||
if(token[0] != '{' || token[1] != '\0')
|
||||
{
|
||||
ri.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
||||
ri.FS_FreeFile(buffers[i]);
|
||||
|
@@ -3595,7 +3595,7 @@ static void ScanAndLoadShaderFiles( void )
|
||||
oldp = p;
|
||||
|
||||
token = COM_ParseExt(&p, qtrue);
|
||||
if(token[0] != '{' && token[1] != '\0')
|
||||
if(token[0] != '{' || token[1] != '\0')
|
||||
{
|
||||
ri.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
||||
ri.FS_FreeFile(buffers[i]);
|
||||
|
Reference in New Issue
Block a user