]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
patch for error in garonne
authorasl <asl@opencascade.com>
Wed, 8 Nov 2017 15:06:07 +0000 (18:06 +0300)
committerasl <asl@opencascade.com>
Wed, 8 Nov 2017 15:06:07 +0000 (18:06 +0300)
src/HYDROData/HYDROData_DTM.cxx

index b31cdbcfe4ed812a783ce2ccc1a1336665094564..3313bfe03501bdf03c81fd6b2206dbd141986751 100644 (file)
@@ -98,8 +98,9 @@ HYDROData_DTM::CurveUZ HYDROData_DTM::CurveUZ::operator + ( const CurveUZ& c ) c
   {
     std::cout << "Warning: different number of points in curves: " << n << ", " << n1 << std::endl;
   }
-  res.reserve( n );
-  for( int i=0; i<n; i++ )
+  int q = std::min(n, n1);
+  res.reserve( q );
+  for( int i=0; i<q; i++ )
   {
     PointUZ p;
     p.U = operator[]( i ).U + c[i].U;