Skip to content
Permalink
Browse files

Correctly return a value from modplug_init(), and correctly check it,…

… too.

Patch by Ozkan Sezer.

  Fixes Bugzilla #941.
  • Loading branch information
icculus committed Feb 4, 2010
1 parent f589f66 commit 0a702016bbc4ba943e7f6bae246f8b1598398297
Showing with 2 additions and 1 deletion.
  1. +1 −1 music.c
  2. +1 −0 music_modplug.c
@@ -321,7 +321,7 @@ int open_music(SDL_AudioSpec *mixer)
}
#endif
#ifdef MODPLUG_MUSIC
if ( modplug_init(mixer) < 0 ) {
if ( modplug_init(mixer) == 0 ) {
add_music_decoder("MODPLUG");
}
#endif
@@ -60,6 +60,7 @@ int modplug_init(SDL_AudioSpec *spec)
settings.mSurroundDelay=10;
settings.mLoopCount=0;
ModPlug_SetSettings(&settings);
return 0;
}

/* Uninitialize the music players */

0 comments on commit 0a70201

Please sign in to comment.