From: hackbard Date: Mon, 8 Nov 2004 12:34:36 +0000 (+0000) Subject: hopefully final bugfix to not et segfaulst using list_next X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=97756a0d0fba8437bc029fbece8b48fb4846b00f;p=my-code%2Fapi.git hopefully final bugfix to not et segfaulst using list_next --- diff --git a/list/list.c b/list/list.c index 13493e6..0cfb441 100644 --- a/list/list.c +++ b/list/list.c @@ -83,6 +83,11 @@ int list_search_data(t_list *list,void *data,int first_bytes) { list_reset(list); + if(list->start==NULL) { + dprintf(list->outfd,"[list] empty list\n"); + return L_EMPTY_LIST; + } + do { if(list->current!=NULL) if(first_bytes<=list->current->data_len)