*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;
*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)");