diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-05-30 22:58:58 -0500 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-05-31 23:12:10 +0100 |
commit | b70392be6737bed9538c572848f54937e4e9e665 (patch) | |
tree | afe050d67706ed751b204615797b8a590bc86f9b /src/renderergl1/tr_shader.c | |
parent | 46b86a1e62a44f734a01a45d4e279cdc5aea2e31 (diff) |
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".
Diffstat (limited to 'src/renderergl1/tr_shader.c')
-rw-r--r-- | src/renderergl1/tr_shader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderergl1/tr_shader.c b/src/renderergl1/tr_shader.c index 0c8c59a7..1d7aeee3 100644 --- a/src/renderergl1/tr_shader.c +++ b/src/renderergl1/tr_shader.c @@ -2956,7 +2956,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]); |