summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/shaderapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 1335f0f411..cc350c93b9 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -644,6 +644,8 @@ get_programiv(GLcontext *ctx, GLuint program, GLenum pname, GLint *params)
break;
case GL_ACTIVE_UNIFORM_MAX_LENGTH:
*params = _mesa_longest_uniform_name(shProg->Uniforms);
+ if (*params > 0)
+ (*params)++; /* add one for terminating zero */
break;
case GL_PROGRAM_BINARY_LENGTH_OES:
*params = 0;