[mapserver-commits] r12822 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Nov 28 14:20:00 EST 2011


Author: assefa
Date: 2011-11-28 11:20:00 -0800 (Mon, 28 Nov 2011)
New Revision: 12822

Modified:
   trunk/mapserver/mapstring.c
Log:
correct local strncasecmp function used for windows (#3751)

Modified: trunk/mapserver/mapstring.c
===================================================================
--- trunk/mapserver/mapstring.c	2011-11-28 16:42:19 UTC (rev 12821)
+++ trunk/mapserver/mapstring.c	2011-11-28 19:20:00 UTC (rev 12822)
@@ -302,9 +302,15 @@
 
   cp1 = s1;
   cp2 = s2;
-  if ((!*cp1) || (!*cp2 )) {
-    return (0);
-  }
+
+  if(len == 0)
+    return(0);
+  
+  if (!*cp1)
+     return -1;
+  else if (!*cp2)
+    return 1;
+  
   while(*cp1 && *cp2 && len) 
   {
       if((cmp = (toupper(*cp1) - toupper(*cp2))) != 0)



More information about the mapserver-commits mailing list