[mapserver-commits] r10838 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Jan 6 14:42:22 EST 2011


Author: aboudreault
Date: 2011-01-06 11:42:22 -0800 (Thu, 06 Jan 2011)
New Revision: 10838

Modified:
   trunk/mapserver/mapdraw.c
Log:
replaced if statement by the appropriate macro for this use

Modified: trunk/mapserver/mapdraw.c
===================================================================
--- trunk/mapserver/mapdraw.c	2011-01-06 15:28:40 UTC (rev 10837)
+++ trunk/mapserver/mapdraw.c	2011-01-06 19:42:22 UTC (rev 10838)
@@ -1399,7 +1399,7 @@
       double maxsize,maxunscaledsize;
       symbolObj *symbol;
       styleObj *style = layer->class[c]->styles[0];
-      if (style->symbol >= map->symbolset.numsymbols) {
+      if (!MS_IS_VALID_ARRAY_INDEX(style->symbol, map->symbolset.numsymbols)) {
           msSetError(MS_SYMERR, "Invalid symbol index: %d", "msDrawShape()", style->symbol);
           return MS_FAILURE;
       }



More information about the mapserver-commits mailing list