diff SDL_sound.c @ 98:dfdf7b4e05bd

Changed __Sound_strcasecmp() to handle NULL strings gracefully.
author Ryan C. Gordon <icculus@icculus.org>
date Tue, 02 Oct 2001 17:53:23 +0000
parents 25ee62c6b333
children 72502bed0aef
line wrap: on
line diff
--- a/SDL_sound.c	Tue Oct 02 17:47:07 2001 +0000
+++ b/SDL_sound.c	Tue Oct 02 17:53:23 2001 +0000
@@ -236,6 +236,15 @@
 {
     int ux, uy;
 
+    if (x == y)  /* same pointer? Both NULL? */
+        return(0);
+
+    if (x == NULL)
+        return(-1);
+
+    if (y == NULL)
+        return(1);
+       
     do
     {
         ux = toupper((int) *x);