diff options
author | Jan Dvorak <[email protected]> | 2007-07-13 16:35:19 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-07-13 16:35:19 -0600 |
commit | e32ae4fe3350066335f0625745de7fafaea43568 (patch) | |
tree | 43b65c98dc5b78ca6b37b80bbf6d0b2f6ec9ca4d /src/mesa | |
parent | 4595389c4c6064f87618ac67cd22dc94d523bb2a (diff) |
fix shader/info string length queries (bug 11588)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/shader_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 3a54e68d0de..b794e30e970 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -780,7 +780,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; @@ -832,10 +832,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)"); |