From 8e2aee37f009e1a796e68ac36e8a1782091422e5 Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 8 Nov 2004 12:16:12 +0000 Subject: [PATCH] another bugfix --- list/list.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/list/list.c b/list/list.c index a64997f..13493e6 100644 --- a/list/list.c +++ b/list/list.c @@ -83,11 +83,11 @@ int list_search_data(t_list *list,void *data,int first_bytes) { list_reset(list); - while(list->current!=NULL) { - if(first_bytes<=list->current->data_len) - if(!(memcmp(list->current->data,data,first_bytes))) return L_SUCCESS; - list_next(list); - } + do { + if(list->current!=NULL) + if(first_bytes<=list->current->data_len) + if(!(memcmp(list->current->data,data,first_bytes))) return L_SUCCESS; + } while(list_next(list)!=L_NO_NEXT_ELEMENT); return L_NO_SUCH_ELEMENT; } -- 2.20.1