[cgma-dev] r2808 - cgm/trunk/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Apr 8 13:09:25 CDT 2009


Author: janehu
Date: 2009-04-08 13:09:25 -0500 (Wed, 08 Apr 2009)
New Revision: 2808

Modified:
   cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
Log:
Fixed the problem that Jed reported.

Modified: cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp	2009-04-08 16:25:12 UTC (rev 2807)
+++ cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp	2009-04-08 18:09:25 UTC (rev 2808)
@@ -433,7 +433,7 @@
     do {
       IS >> buffer;
       i = buffer.find_first_of("*");
-      if(i > 0)
+      if(i > 0 && i < buffer.size())
       {
         stringdata = buffer.substr( 0, i );
         CubitString* string_prt2 = new CubitString(stringdata.c_str());
@@ -444,7 +444,7 @@
       IS.get(); //' '
       IS.get(s); //either '*' or 'number' or a char
       IS.unget();
-    } while(s!= '*' && !(s > '0' && s < '9'));
+    } while(s!= '*' && !(s >= '0' && s <= '9'));
     
     int tmp_int;
     double  tmp_dbl; 



More information about the cgma-dev mailing list