From b0878fe60962212614d251815e533b0e0a704989 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 23 Dec 2013 23:42:21 -0800 Subject: Do not accept preset or instrument ID 0 as valid --- OpenAL32/alInstrument.c | 3 +-- OpenAL32/alPreset.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/alInstrument.c b/OpenAL32/alInstrument.c index dfcb93ba..5ab2fef2 100644 --- a/OpenAL32/alInstrument.c +++ b/OpenAL32/alInstrument.c @@ -109,8 +109,7 @@ AL_API ALboolean AL_APIENTRY alIsInstrumentSOFT(ALuint id) context = GetContextRef(); if(!context) return AL_FALSE; - ret = ((!id || LookupInstrument(context->Device, id)) ? - AL_TRUE : AL_FALSE); + ret = LookupInstrument(context->Device, id) ? AL_TRUE : AL_FALSE; ALCcontext_DecRef(context); diff --git a/OpenAL32/alPreset.c b/OpenAL32/alPreset.c index c01f4e80..9e4eed4f 100644 --- a/OpenAL32/alPreset.c +++ b/OpenAL32/alPreset.c @@ -109,8 +109,7 @@ AL_API ALboolean AL_APIENTRY alIsPresetSOFT(ALuint id) context = GetContextRef(); if(!context) return AL_FALSE; - ret = ((!id || LookupPreset(context->Device, id)) ? - AL_TRUE : AL_FALSE); + ret = LookupPreset(context->Device, id) ? AL_TRUE : AL_FALSE; ALCcontext_DecRef(context); -- cgit v1.2.3