From e71021ebacffab7da3055345b88ce3492329e80d Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Fri, 21 Nov 2008 17:07:01 +0000
Subject: [PATCH] *** empty log message ***

---
 Common/ListUtils.cpp | 2 +-
 Geo/Geo.cpp          | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Common/ListUtils.cpp b/Common/ListUtils.cpp
index 6eb8551647..c273fa3940 100644
--- a/Common/ListUtils.cpp
+++ b/Common/ListUtils.cpp
@@ -286,7 +286,7 @@ void List_Insert_In_List(List_T *a, int i, List_T *b)
     memcpy(List_Pointer_Fast(b, b->n - j - 1), List_Pointer_Fast(b, oldn - j - 1),
            b->size);
   for(int j = 0;j < a->n; j++)
-    memcpy(List_Pointer_Fast(b, oldn + j), List_Pointer_Fast(a, j), b->size);
+    memcpy(List_Pointer_Fast(b, i + j), List_Pointer_Fast(a, j), b->size);
 }
 
 void swap_bytes(char *array, int size, int n)
diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp
index 2294f85ed7..5832b233e4 100644
--- a/Geo/Geo.cpp
+++ b/Geo/Geo.cpp
@@ -3057,9 +3057,11 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
       if(surface_curve->Num == c->Num){
         List_Remove(s->Generatrices, j);
         List_Insert_In_List(shapes, j, s->Generatrices);
+        j+=List_Nbr(shapes)-1;
       }else if(surface_curve->Num == -c->Num){
         List_Remove(s->Generatrices, j);
         List_Insert_In_List(rshapes, j, s->Generatrices);
+        j+=List_Nbr(shapes)-1;
       }
     }
   }
@@ -3067,6 +3069,7 @@ bool SplitCurve(int line_id, List_T *vertices_id, List_T *shapes)
   DeleteShape(c->Typ, c->Num);
   List_Delete(new_list);
   List_Delete(rshapes);
+
   return true;
 }
 
-- 
GitLab