projects
/
my-code
/
api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8e2aee3
)
hopefully final bugfix to not et segfaulst using list_next
author
hackbard
<hackbard>
Mon, 8 Nov 2004 12:34:36 +0000
(12:34 +0000)
committer
hackbard
<hackbard>
Mon, 8 Nov 2004 12:34:36 +0000
(12:34 +0000)
list/list.c
patch
|
blob
|
history
diff --git
a/list/list.c
b/list/list.c
index
13493e6
..
0cfb441
100644
(file)
--- 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);
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)
do {
if(list->current!=NULL)
if(first_bytes<=list->current->data_len)