Salome HOME
Indexation of OCC sequence is started from 1, but not 0.
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index cabe36237be79be987973860dd77cfec785cfa0b..7d5e9f23ee9278956160791b4f65f8d9431f4858 100644 (file)
@@ -3715,9 +3715,9 @@ void _pyCommand::Comment()
     myString.Insert( i, "#" );
     for ( int iPart = 0; iPart < myBegPos.Length(); ++iPart )
     {
-      int begPos = GetBegPos( iPart );
+      int begPos = GetBegPos( iPart + 1 );
       if ( begPos != UNKNOWN )
-        SetBegPos( iPart, begPos + 1 );
+        SetBegPos( iPart + 1, begPos + 1 );
     }
   }
 }