diff --git a/engine/lists.c b/engine/lists.c index e982719..44b3785 100644 --- a/engine/lists.c +++ b/engine/lists.c @@ -107,7 +107,7 @@ LIST * list_new( OBJECT * value ) { LIST * const head = list_alloc( 1 ) ; head->impl.size = 1; - list_begin( head )[ 0 ] = value; + list_begin( head )[ 0 ] = object_copy( value ); return head; } @@ -136,7 +136,7 @@ LIST * list_push_back( LIST * head, OBJECT * value ) head = l; } - list_begin( head )[ size ] = value; + list_begin( head )[ size ] = object_copy( value ); head->impl.size = size + 1; return head;