ALSA: Fixed adding wrong status to error message (thanks, romain145!). Fixes Bugzilla #3364.
diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c
index 162ce8c..1a84380 100644
--- a/src/audio/alsa/SDL_alsa_audio.c
+++ b/src/audio/alsa/SDL_alsa_audio.c
@@ -607,7 +607,8 @@ ALSA_OpenDevice(_THIS, void *handle, const char *devname, int iscapture)
if ( ALSA_set_period_size(this, hwparams, 0) < 0 &&
ALSA_set_buffer_size(this, hwparams, 0) < 0 ) {
/* Failed to set desired buffer size, do the best you can... */
- if ( ALSA_set_period_size(this, hwparams, 1) < 0 ) {
+ status = ALSA_set_period_size(this, hwparams, 1);
+ if (status < 0) {
ALSA_CloseDevice(this);
return SDL_SetError("Couldn't set hardware audio parameters: %s", ALSA_snd_strerror(status));
}