From 713957f9d238af876a285fd2657303a4481eb988 Mon Sep 17 00:00:00 2001 From: theraven Date: Tue, 11 Dec 2012 17:30:04 +0000 Subject: [PATCH] Fix lookup of properties after getting their attributes. --- properties.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/properties.m b/properties.m index 2cde3fa..a2004b0 100644 --- a/properties.m +++ b/properties.m @@ -173,7 +173,7 @@ objc_property_t class_getProperty(Class cls, const char *name) for (int i=0 ; icount ; i++) { objc_property_t p = &properties->properties[i]; - if (strcmp(p->name, name) == 0) + if (strcmp(property_getName(p), name) == 0) { return p; } @@ -373,7 +373,7 @@ PRIVATE const char *constructPropertyAttributes(objc_property_t property, *(insert++) = '\0'; } encoding[1] = (unsigned char)(uintptr_t)(insert - encoding); - memcpy(insert, property->name, nameSize); + memcpy(insert, name, nameSize); insert += nameSize; *insert = '\0'; // If another thread installed the encoding string while we were computing