1.2 backport: Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 01 Oct 2006 02:07:09 +0000
branchSDL-1.2
changeset 3881c1b6bb5205f1
parent 3880 74e828c64315
child 3882 842b03d703c5
1.2 backport: Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp.
Fixes Bugzilla #334.
src/audio/SDL_audio.c
     1.1 --- a/src/audio/SDL_audio.c	Sun Sep 24 15:45:37 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Sun Oct 01 02:07:09 2006 +0000
     1.3 @@ -350,7 +350,7 @@
     1.4  		   This probably isn't the place to do this, but... Shh! :)
     1.5  		 */
     1.6  		for ( i=0; bootstrap[i]; ++i ) {
     1.7 -			if ( SDL_strcmp(bootstrap[i]->name, "esd") == 0 ) {
     1.8 +			if ( SDL_strcasecmp(bootstrap[i]->name, "esd") == 0 ) {
     1.9  #ifdef HAVE_PUTENV
    1.10  				const char *esd_no_spawn;
    1.11  
    1.12 @@ -381,8 +381,7 @@
    1.13  			}
    1.14  #endif
    1.15  			for ( i=0; bootstrap[i]; ++i ) {
    1.16 -				if (SDL_strncmp(bootstrap[i]->name, driver_name,
    1.17 -				            SDL_strlen(bootstrap[i]->name)) == 0) {
    1.18 +				if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
    1.19  					if ( bootstrap[i]->available() ) {
    1.20  						audio=bootstrap[i]->create(idx);
    1.21  						break;