From e4a866c874b1b367c1ad9158894eaaaeedfa2b7d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 14 Jul 2013 11:28:18 -0400 Subject: [PATCH] Fixed off-by-one error in SDL_AudioQuit() (thanks, Rainer!). Audio Devices IDs are offset by one. Fixes Bugzilla #1971. --- src/audio/SDL_audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c index ff60e7f7a..29ae10044 100644 --- a/src/audio/SDL_audio.c +++ b/src/audio/SDL_audio.c @@ -1184,7 +1184,7 @@ SDL_AudioQuit(void) for (i = 0; i < SDL_arraysize(open_devices); i++) { if (open_devices[i] != NULL) { - SDL_CloseAudioDevice(i); + SDL_CloseAudioDevice(i+1); } }