mesa: fix dropped && in glGetStringi()
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 16 Sep 2012 07:54:11 +0000 (19:54 +1200)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 16 Sep 2012 08:47:00 +0000 (01:47 -0700)
This fixes glGetStringi(GL_EXTENSIONS,.. for core contexts. Previously,
all extension names returned would be NULL.

NOTE: This is a candidate for release branches.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/extensions.c

index 6fe7ad1aebbae993ea2ad72b7d5ab66a8cb26f15..bd7c7baf9120c9fbaf69d4d98c8d5c3c9535c97d 100644 (file)
@@ -885,7 +885,7 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
    base = (GLboolean*) &ctx->Extensions;
    n = 0;
    for (i = extension_table; i->name != 0; ++i) {
-      if (base[i->offset] & (i->api_set & (1 << ctx->API))) {
+      if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
          if (n == index)
             return (const GLubyte*) i->name;
          else