From ec5046f8caa04abb1eb0a65d99dee61509196016 Mon Sep 17 00:00:00 2001 From: theraven Date: Wed, 12 Oct 2011 10:17:17 +0000 Subject: [PATCH] Work around GCC bug. --- protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol.c b/protocol.c index 25bb2cf..5b94e54 100644 --- a/protocol.c +++ b/protocol.c @@ -609,7 +609,8 @@ void protocol_addProperty(Protocol *aProtocol, } struct objc_property_list *list = *listPtr; int index = list->count-1; - list->properties[index] = propertyFromAttrs(attributes, attributeCount); - list->properties[index].name = strdup(name); + struct objc_property p = propertyFromAttrs(attributes, attributeCount); + p.name = strdup(name); + memcpy(&(list->properties[index]), &p, sizeof(p)); }