diff options
Diffstat (limited to 'src/xdemos/glinfo_common.c')
-rw-r--r-- | src/xdemos/glinfo_common.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/xdemos/glinfo_common.c b/src/xdemos/glinfo_common.c index 3cbe4edc..88bb9295 100644 --- a/src/xdemos/glinfo_common.c +++ b/src/xdemos/glinfo_common.c @@ -310,12 +310,22 @@ build_core_profile_extension_list(const struct ext_functions *extfuncs) GLboolean extension_supported(const char *ext, const char *extensionsList) { - const char *p = strstr(extensionsList, ext); - if (p) { - /* check that next char is a space or end of string */ - int extLen = strlen(ext); - if (p[extLen] == 0 || p[extLen] == ' ') - return 1; + while (1) { + const char *p = strstr(extensionsList, ext); + if (p) { + /* check that next char is a space or end of string */ + int extLen = strlen(ext); + if (p[extLen] == 0 || p[extLen] == ' ') { + return 1; + } + else { + /* We found a superset string, keep looking */ + extensionsList += extLen; + } + } + else { + break; + } } return 0; } |