From b70392be6737bed9538c572848f54937e4e9e665 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Thu, 30 May 2013 22:58:58 -0500 Subject: 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". --- src/renderergl1/tr_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/renderergl1/tr_shader.c') 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]); -- cgit