mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
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:
parent
120e296a74
commit
eb73dcb7f4
2 changed files with 2 additions and 2 deletions
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue