From cdc31c6c0da5b853648df4b8dc75bd1a8544cec1 Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 9 Oct 2012 12:35:54 +0000 Subject: [PATCH] Fix class_addProperty(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Luboš Doležel! --- properties.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/properties.m b/properties.m index fe4344d..96c1418 100644 --- a/properties.m +++ b/properties.m @@ -466,7 +466,7 @@ BOOL class_addProperty(Class cls, struct objc_property_list *l = calloc(1, sizeof(struct objc_property_list) + sizeof(struct objc_property)); - l->count = 0; + l->count = 1; memcpy(&l->properties, &p, sizeof(struct objc_property)); LOCK_RUNTIME_FOR_SCOPE(); l->next = cls->properties;