aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alExtension.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alExtension.c')
-rw-r--r--OpenAL32/alExtension.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index 785f172e..fc23a932 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -55,38 +55,36 @@ const struct EffectList EffectList[] = {
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
{
ALboolean ret = AL_FALSE;
- ALCcontext *Context;
+ ALCcontext *context;
const char *ptr;
size_t len;
- Context = GetContextRef();
- if(!Context) return AL_FALSE;
+ context = GetContextRef();
+ if(!context) return AL_FALSE;
- al_try
- {
- CHECK_VALUE(Context, extName);
+ if(!(extName))
+ SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
- len = strlen(extName);
- ptr = Context->ExtensionList;
- while(ptr && *ptr)
+ len = strlen(extName);
+ ptr = context->ExtensionList;
+ while(ptr && *ptr)
+ {
+ if(strncasecmp(ptr, extName, len) == 0 &&
+ (ptr[len] == '\0' || isspace(ptr[len])))
+ {
+ ret = AL_TRUE;
+ break;
+ }
+ if((ptr=strchr(ptr, ' ')) != NULL)
{
- if(strncasecmp(ptr, extName, len) == 0 &&
- (ptr[len] == '\0' || isspace(ptr[len])))
- {
- ret = AL_TRUE;
- break;
- }
- if((ptr=strchr(ptr, ' ')) != NULL)
- {
- do {
- ++ptr;
- } while(isspace(*ptr));
- }
+ do {
+ ++ptr;
+ } while(isspace(*ptr));
}
}
- al_endtry;
- ALCcontext_DecRef(Context);
+done:
+ ALCcontext_DecRef(context);
return ret;
}