From 7166a41999bbdb25aa7c7d33e4b4c38389934b15 Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Wed, 16 Oct 2019 09:19:23 +0200 Subject: [PATCH] Fixed usage of properties linked list. --- properties.m | 2 +- protocol.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {