Correctly return a value from modplug_init(), and correctly check it, too.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 04 Feb 2010 20:32:01 +0000
changeset 484a77df8583d18
parent 483 685cb4a41b92
child 485 e2c905c12312
Correctly return a value from modplug_init(), and correctly check it, too.

Patch by Ozkan Sezer.

Fixes Bugzilla #941.
music.c
music_modplug.c
     1.1 --- a/music.c	Thu Feb 04 05:01:02 2010 +0000
     1.2 +++ b/music.c	Thu Feb 04 20:32:01 2010 +0000
     1.3 @@ -321,7 +321,7 @@
     1.4  	}
     1.5  #endif
     1.6  #ifdef MODPLUG_MUSIC
     1.7 -	if ( modplug_init(mixer) < 0 ) {
     1.8 +	if ( modplug_init(mixer) == 0 ) {
     1.9  		add_music_decoder("MODPLUG");
    1.10  	}
    1.11  #endif
     2.1 --- a/music_modplug.c	Thu Feb 04 05:01:02 2010 +0000
     2.2 +++ b/music_modplug.c	Thu Feb 04 20:32:01 2010 +0000
     2.3 @@ -60,6 +60,7 @@
     2.4  	settings.mSurroundDelay=10;
     2.5  	settings.mLoopCount=0;
     2.6  	ModPlug_SetSettings(&settings);
     2.7 +	return 0;
     2.8  }
     2.9  
    2.10  /* Uninitialize the music players */