diff --git a/src/sound_effects_cache.cc b/src/sound_effects_cache.cc index e7af03d..eaae80c 100644 --- a/src/sound_effects_cache.cc +++ b/src/sound_effects_cache.cc @@ -176,7 +176,7 @@ int soundEffectsCacheFileOpen(const char* fname, int mode, ...) void* data; CacheEntry* cacheHandle; - if (cacheLock(gSoundEffectsCache, tag, &data, &cacheHandle) == -1) { + if (!cacheLock(gSoundEffectsCache, tag, &data, &cacheHandle)) { return -1; }