0023148: Error in stepstrcmp
authorgka <gka@opencascade.com>
Fri, 11 May 2012 12:59:04 +0000 (16:59 +0400)
committergka <gka@opencascade.com>
Fri, 18 May 2012 07:46:42 +0000 (11:46 +0400)
Fix for reading complex entities in STEP reader

src/StepData/StepData_StepReaderData.cxx

index 3838d4c..f644b78 100755 (executable)
@@ -355,7 +355,7 @@ static Standard_Boolean stepstrcmp(const Standard_CString type,
 //  Attention : False pour dire OK, True sinon (car remplace strcmp)
   Standard_Integer i,j = 0; Standard_Boolean res = Standard_False;
   for (i = 0; name[i] != '\0' && type[i] != '\0' && !res ; i ++) {
 //  Attention : False pour dire OK, True sinon (car remplace strcmp)
   Standard_Integer i,j = 0; Standard_Boolean res = Standard_False;
   for (i = 0; name[i] != '\0' && type[i] != '\0' && !res ; i ++) {
-    if (name[i] == ' ') { j = i; break; }
+    if (name[i] == ' ' && type[i] == '\0') { j = i; break; }
     if (type[i] != name[i]) res = Standard_True;
   }
   if (!res || (j == 0)) return res;
     if (type[i] != name[i]) res = Standard_True;
   }
   if (!res || (j == 0)) return res;