diff options
-rw-r--r-- | Alc/ALc.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; } |