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:
1 parent
120e296a74
commit
eb73dcb7f4
2 files changed
+2
-2
No files matched your search
@@ -2955,7 +2955,7 @@ static void ScanAndLoadShaderFiles( void )
|
|||||||
oldp = p;
|
oldp = p;
|
||||||
|
|
||||||
token = COM_ParseExt(&p, qtrue);
|
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.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
||||||
ri.FS_FreeFile(buffers[i]);
|
ri.FS_FreeFile(buffers[i]);
|
||||||
|
|||||||
@@ -3595,7 +3595,7 @@ static void ScanAndLoadShaderFiles( void )
|
|||||||
oldp = p;
|
oldp = p;
|
||||||
|
|
||||||
token = COM_ParseExt(&p, qtrue);
|
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.Printf(PRINT_WARNING, "WARNING: Bad shader file %s has incorrect syntax.\n", filename);
|
||||||
ri.FS_FreeFile(buffers[i]);
|
ri.FS_FreeFile(buffers[i]);
|
||||||
|
|||||||
Reference in new issue
Block a user