summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
authorJan Dvorak <jan.dvorak@kraxnet.cz>2007-07-13 16:36:00 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-07-13 16:36:00 -0600
commit5a0f02a394cec0603fe48de55f4cbe323d2357e0 (patch)
tree32d1e4fb1210ea377707a451263f4d41236eefc1 /src/mesa/shader/shader_api.c
parent8fcfaa3238599f5a9b28794b748b8417e042c597 (diff)
fix shader/info string length queries (bug 11588)
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 66509d56db..1a931326af 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -779,7 +779,7 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program,
*params = shProg->Validated;
break;
case GL_INFO_LOG_LENGTH:
- *params = shProg->InfoLog ? strlen(shProg->InfoLog) : 0;
+ *params = shProg->InfoLog ? strlen(shProg->InfoLog) + 1 : 0;
break;
case GL_ATTACHED_SHADERS:
*params = shProg->NumShaders;
@@ -831,10 +831,10 @@ _mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
*params = shader->CompileStatus;
break;
case GL_INFO_LOG_LENGTH:
- *params = shader->InfoLog ? strlen(shader->InfoLog) : 0;
+ *params = shader->InfoLog ? strlen(shader->InfoLog) + 1 : 0;
break;
case GL_SHADER_SOURCE_LENGTH:
- *params = shader->Source ? strlen((char *) shader->Source) : 0;
+ *params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)");