Forráskód Böngészése

In IFC, fixed parser to avoid interpretation of '##' in string as identifiers

Leo Terziman 7 éve
szülő
commit
c797f16b0e
1 módosított fájl, 11 hozzáadás és 4 törlés
  1. 11 4
      code/Importer/IFC/STEPFileReader.cpp

+ 11 - 4
code/Importer/IFC/STEPFileReader.cpp

@@ -492,10 +492,17 @@ STEP::LazyObject::LazyObject(DB& db, uint64_t id,uint64_t /*line*/, const char*
                 --skip_depth;
             }
 
-            if (skip_depth >= 1 && *a=='#') {
-                const char* tmp;
-                const int64_t num = static_cast<int64_t>( strtoul10_64(a+1,&tmp) );
-                db.MarkRef(num,id);
+			if (skip_depth >= 1 && *a=='#') {
+				if (*(a + 1) != '#')
+				{
+					const char* tmp;
+					const int64_t num = static_cast<int64_t>(strtoul10_64(a + 1, &tmp));
+					db.MarkRef(num, id);
+				}
+				else
+				{
+					++a;
+				}
             }
             ++a;
         }