collections: Fix a bug in the stack implementation.
authorRaphael Fuchs <fuchs.raphael@gmail.com>
Wed, 26 Jun 2013 18:26:31 +0000 (20:26 +0200)
committerRaphael Fuchs <fuchs.raphael@gmail.com>
Wed, 26 Jun 2013 18:26:31 +0000 (20:26 +0200)
lib/collections/stack.c

index 2ab1426..e1055b0 100644 (file)
@@ -37,6 +37,7 @@ void collections_stack_create(struct collections_stack **stack)
     (*stack)->num_elements = 0;
 
     // create a linked list to hold the elements of the stack
+    collections_list_create(&(*stack)->elements, NULL);
 
     return;
 }