diff --git a/properties.m b/properties.m index c2216e9..7c1d9a8 100644 --- a/properties.m +++ b/properties.m @@ -302,7 +302,7 @@ objc_property_t* class_copyPropertyList(Class cls, unsigned int *outCount) unsigned int out = 0; for (struct objc_property_list *l=properties ; NULL!=l ; l=l->next) { - for (int i=0 ; icount ; i++) + for (int i=0 ; icount ; i++) { list[out++] = property_at_index(l, i); } diff --git a/protocol.c b/protocol.c index dd1061e..e0144e2 100644 --- a/protocol.c +++ b/protocol.c @@ -421,7 +421,7 @@ objc_property_t *protocol_copyPropertyList2(Protocol *p, unsigned int *outCount, unsigned int count = 0; for (struct objc_property_list *l=properties ; l!=NULL ; l=l->next) { - count += properties->count; + count += l->count; } if (0 == count) {