diff --git a/src/dispatch_common.c b/src/dispatch_common.c index 4fb8755..b36b639 100644 --- a/src/dispatch_common.c +++ b/src/dispatch_common.c @@ -331,12 +331,13 @@ epoxy_internal_has_gl_extension(const char *ext, bool invalid_op_mode) return epoxy_extension_in_string(exts, ext); } else { int num_extensions; + int i; glGetIntegerv(GL_NUM_EXTENSIONS, &num_extensions); if (num_extensions == 0) return invalid_op_mode; - for (int i = 0; i < num_extensions; i++) { + for (i = 0; i < num_extensions; i++) { const char *gl_ext = (const char *)glGetStringi(GL_EXTENSIONS, i); if (strcmp(ext, gl_ext) == 0) return true;