From 76c9f48d13dbb177cd210d0efd2d788a181215eb Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 20 Aug 2015 06:12:05 +0000 Subject: [PATCH] fix bloom etc bug. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4968 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_shader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engine/gl/gl_shader.c b/engine/gl/gl_shader.c index 1904f5d63..a3a674fe7 100644 --- a/engine/gl/gl_shader.c +++ b/engine/gl/gl_shader.c @@ -985,8 +985,9 @@ static qboolean Shader_ParseProgramCvar(char *script, cvar_t **cvarrefs, char ** script++; out = body; - while (out < com_token+countof(body) && *script != '\n') - *out++; + while (out < com_token+countof(body)-1 && *script != '\n' && !(script[0] == '/' && script[1] == '/')) + *out++ = *script++; + *out++ = 0; cvarrefs[0] = Cvar_Get(cvarnames[0], body, 0, "GLSL Variables"); } else