Commit a5c2c63a a5c2c63a626be82bcec512b4d945af4fbcf29c19 by Sergey Poznyakoff

(list_to_array): Bugfix. The counter was not incremented.

1 parent c9927023
...@@ -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;
......