[Piglit] [PATCH 4/4] util/gl: Fix off-by-one in piglit_get_glsl_version

Anuj Phogat anuj.phogat at gmail.com
Fri Nov 30 18:39:13 PST 2012


On Fri, Nov 30, 2012 at 5:46 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> This bug broke piglit_get_glsl_version on GLES.
>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
>  tests/util/piglit-shader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c
> index dbe8bc1..f41ae79 100644
> --- a/tests/util/piglit-shader.c
> +++ b/tests/util/piglit-shader.c
> @@ -36,7 +36,7 @@ void piglit_get_glsl_version(bool *es, int* major, int* minor)
>         int c; /* scanf count */
>
>         version_string = (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION);
> -       es_local = strncmp("OpenGL ES", version_string, 10) == 0;
> +       es_local = strncmp("OpenGL ES", version_string, 9) == 0;
>         if (es_local) {
>                 c = sscanf(version_string,
>                            "OpenGL ES GLSL ES %i.%i",
> --
> 1.7.11.7
>

This series is Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list