diff options
Diffstat (limited to 'al')
-rw-r--r-- | al/extension.cpp | 12 | ||||
-rw-r--r-- | al/state.cpp | 2 |
2 files changed, 3 insertions, 11 deletions
diff --git a/al/extension.cpp b/al/extension.cpp index 3ead0af8..dbaf4d5f 100644 --- a/al/extension.cpp +++ b/al/extension.cpp @@ -46,18 +46,10 @@ START_API_FUNC } size_t len{strlen(extName)}; - const char *ptr{context->mExtensionList}; - while(ptr && *ptr) + for(std::string_view ext : context->mExtensions) { - if(al::strncasecmp(ptr, extName, len) == 0 && (ptr[len] == '\0' || isspace(ptr[len]))) + if(len == ext.length() && al::strncasecmp(ext.data(), extName, len) == 0) return AL_TRUE; - - if((ptr=strchr(ptr, ' ')) != nullptr) - { - do { - ++ptr; - } while(isspace(*ptr)); - } } return AL_FALSE; diff --git a/al/state.cpp b/al/state.cpp index fb3186c7..cb2afd6c 100644 --- a/al/state.cpp +++ b/al/state.cpp @@ -560,7 +560,7 @@ START_API_FUNC break; case AL_EXTENSIONS: - value = context->mExtensionList; + value = context->mExtensionsString.c_str(); break; case AL_NO_ERROR: |