[mapserver-commits] r10092 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Sat Apr 10 11:23:46 EDT 2010
Author: warmerdam
Date: 2010-04-10 11:23:45 -0400 (Sat, 10 Apr 2010)
New Revision: 10092
Modified:
trunk/mapserver/mapraster.c
Log:
improve the handling of simple string comparisons for raster query (#3425)
Modified: trunk/mapserver/mapraster.c
===================================================================
--- trunk/mapserver/mapraster.c 2010-04-10 15:22:49 UTC (rev 10091)
+++ trunk/mapserver/mapraster.c 2010-04-10 15:23:45 UTC (rev 10092)
@@ -153,7 +153,12 @@
switch(layer->class[i]->expression.type) {
case(MS_STRING):
sprintf(tmpstr2, "%18g", fValue );
- if(strcmp(layer->class[i]->expression.string, tmpstr2) == 0) return(i); /* matched */
+ /* trim junk white space */
+ tmpstr1= tmpstr2;
+ while( *tmpstr1 == ' ' )
+ tmpstr1++;
+
+ if(strcmp(layer->class[i]->expression.string, tmpstr1) == 0) return(i); /* matched */
break;
case(MS_REGEX):
More information about the mapserver-commits
mailing list