aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-29 20:34:47 -0700
committerChris Robinson <[email protected]>2011-08-29 20:34:47 -0700
commit500ad776ea5bba13240cde84b2aa7c1caca77753 (patch)
treec638d49da3418c037718707cede102db3d21c993 /OpenAL32
parente4a2b69b37dcefcf2939bc020421daa467a64f43 (diff)
Exchange the AL error when retrieving it
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alError.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/OpenAL32/alError.c b/OpenAL32/alError.c
index c4c9f4dd..b30755d9 100644
--- a/OpenAL32/alError.c
+++ b/OpenAL32/alError.c
@@ -32,8 +32,7 @@ AL_API ALenum AL_APIENTRY alGetError(ALvoid)
Context = GetLockedContext();
if(!Context) return AL_INVALID_OPERATION;
- errorCode = Context->LastError;
- Context->LastError = AL_NO_ERROR;
+ errorCode = Exchange_ALenum(&Context->LastError, AL_NO_ERROR);
UnlockContext(Context);