Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 01 Oct 2006 02:06:37 +0000
changeset 2045510892a215a2
parent 2044 8d5d119b1640
child 2046 da8332c8f480
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 Oct 01 01:12:08 2006 +0000
     1.2 +++ b/src/audio/SDL_audio.c	Sun Oct 01 02:06:37 2006 +0000
     1.3 @@ -371,7 +371,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 @@ -397,8 +397,7 @@
    1.13      if (audio == NULL) {
    1.14          if (driver_name != NULL) {
    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                      }