Fix protocol_copyProtocolList() to return the correct count value.

This commit is contained in:
theraven 2013-12-20 12:34:11 +00:00
parent 39b6c20d5e
commit a78a7f3e6b

View File

@ -336,6 +336,7 @@ Protocol*__unsafe_unretained* protocol_copyProtocolList(Protocol *p, unsigned in
return NULL; return NULL;
} }
*count = p->protocol_list->count;
Protocol **out = calloc(sizeof(Protocol*), p->protocol_list->count); Protocol **out = calloc(sizeof(Protocol*), p->protocol_list->count);
for (int i=0 ; i<p->protocol_list->count ; i++) for (int i=0 ; i<p->protocol_list->count ; i++)
{ {