[mapserver-commits] r8859 - branches/branch-5-4/mapserver

svn at osgeo.org svn at osgeo.org
Wed Apr 1 21:25:31 EDT 2009


Author: sdlime
Date: 2009-04-01 21:25:31 -0400 (Wed, 01 Apr 2009)
New Revision: 8859

Modified:
   branches/branch-5-4/mapserver/mapsymbol.c
Log:
Restored computation of symbol size (when symbols are read) to match older versions. (#2963)

Modified: branches/branch-5-4/mapserver/mapsymbol.c
===================================================================
--- branches/branch-5-4/mapserver/mapsymbol.c	2009-04-01 04:00:59 UTC (rev 8858)
+++ branches/branch-5-4/mapserver/mapsymbol.c	2009-04-02 01:25:31 UTC (rev 8859)
@@ -293,7 +293,7 @@
 	switch(msyylex()) {  
 	case(END):
 	  if(s->patternlength < 2) {
-	    msSetError(MS_SYMERR, "Not enough pattern elements. A minimum of 2 are required", "loadSymbol()");
+	    msSetError(MS_SYMERR, "Not enough pattern elements. A minimum of 2 are required.", "loadSymbol()");
 	    return(-1);
 	  }	  
 	  done = MS_TRUE;
@@ -316,9 +316,14 @@
       break;
     case(POINTS):
       done = MS_FALSE;
+      s->sizex = s->sizey = 0;
       for(;;) {
 	switch(msyylex()) { 
 	case(END):
+          if(s->numpoints < 1) {
+            msSetError(MS_SYMERR, "Not enough points are defined", "loadSymbol()");
+            return(-1);
+          }
 	  done = MS_TRUE;
 	  break;
 	case(MS_NUMBER):



More information about the mapserver-commits mailing list