Xcos MVC: fix a vector copy 11/15211/2
Paul Bignier [Fri, 12 Sep 2014 07:38:58 +0000 (09:38 +0200)]
Change-Id: I4da8d7668ef49654f98ae0baa49571aed271942a

scilab/modules/scicos/src/cpp/view_scilab/LinkAdapter.cpp

index b8369c5..f639337 100644 (file)
@@ -98,9 +98,9 @@ struct yy
         types::Double* o = new types::Double(size, 1, &data);
 
 #ifdef _MSC_VER
-        std::copy(controlPoints.begin(), controlPoints.begin() + size, stdext::checked_array_iterator<double*>(data, size));
+        std::copy(controlPoints.begin() + size, controlPoints.end(), stdext::checked_array_iterator<double*>(data, size));
 #else
-        std::copy(controlPoints.begin(), controlPoints.begin() + size, data);
+        std::copy(controlPoints.begin() + size, controlPoints.end(), data);
 #endif
         return o;
     }