summaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index c5d9a00c..3ea5e38a 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1181,16 +1181,16 @@ ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumName)
{
ALsizei i = 0;
- ALCenum val;
- while(enumeration[i].enumName && strcmp(enumeration[i].enumName,enumName) == 0)
- i++;
- val = enumeration[i].value;
-
- if(!enumeration[i].enumName)
+ if(!enumName)
+ {
alcSetError(device, ALC_INVALID_VALUE);
+ return (ALCenum)0;
+ }
- return val;
+ while(enumeration[i].enumName && strcmp(enumeration[i].enumName,enumName) == 0)
+ i++;
+ return enumeration[i].value;
}