From d06f6855b63cd0a86eb6ac3948523dbcee997efa Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 8 Nov 2004 11:46:09 +0000 Subject: [PATCH] fixed list api --- list/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list/list.c b/list/list.c index 063583c..a64997f 100644 --- a/list/list.c +++ b/list/list.c @@ -154,7 +154,7 @@ int list_count(t_list *list) { list_reset(list); if(list->current!=NULL) count++; - while(list_next(list)!=L_NO_NEXT_ELEMENT) count++; + if(count) while(list_next(list)!=L_NO_NEXT_ELEMENT) count++; return count; } -- 2.20.1