diff src/audio/SDL_audio.c @ 2045:510892a215a2

Replaced strncmp for SDL_AUDIODRIVER test with strcasecmp. Fixes Bugzilla #334.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 01 Oct 2006 02:06:37 +0000
parents 7a3889fc9e5d
children 5f6550e5184f 3a64f57eb3cf
line wrap: on
line diff
--- a/src/audio/SDL_audio.c	Sun Oct 01 01:12:08 2006 +0000
+++ b/src/audio/SDL_audio.c	Sun Oct 01 02:06:37 2006 +0000
@@ -371,7 +371,7 @@
            This probably isn't the place to do this, but... Shh! :)
          */
         for (i = 0; bootstrap[i]; ++i) {
-            if (SDL_strcmp(bootstrap[i]->name, "esd") == 0) {
+            if (SDL_strcasecmp(bootstrap[i]->name, "esd") == 0) {
 #ifdef HAVE_PUTENV
                 const char *esd_no_spawn;
 
@@ -397,8 +397,7 @@
     if (audio == NULL) {
         if (driver_name != NULL) {
             for (i = 0; bootstrap[i]; ++i) {
-                if (SDL_strncmp(bootstrap[i]->name, driver_name,
-                                SDL_strlen(bootstrap[i]->name)) == 0) {
+                if (SDL_strcasecmp(bootstrap[i]->name, driver_name) == 0) {
                     if (bootstrap[i]->available()) {
                         audio = bootstrap[i]->create(idx);
                     }