(list_to_array): Bugfix. The counter was not incremented.
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -376,7 +376,7 @@ list_to_array (list_t list, void **array, size_t count, size_t *pcount) | ... | @@ -376,7 +376,7 @@ list_to_array (list_t list, void **array, size_t count, size_t *pcount) |
376 | 376 | ||
377 | for (i = 0, current = list->head.next; | 377 | for (i = 0, current = list->head.next; |
378 | i < total && current != &(list->head); current = current->next) | 378 | i < total && current != &(list->head); current = current->next) |
379 | array[i] = current->item; | 379 | array[i++] = current->item; |
380 | } | 380 | } |
381 | if (pcount) | 381 | if (pcount) |
382 | *pcount = total; | 382 | *pcount = total; | ... | ... |
-
Please register or sign in to post a comment