From 7a9b105817ea8f18bfb32448fbd6c1b0fb0e7fea Mon Sep 17 00:00:00 2001 From: theraven Date: Wed, 19 May 2010 14:33:55 +0000 Subject: [PATCH] Fixed missing ! in dtable construction code, which meant that class methods were being preferred to category methods. --- dtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtable.c b/dtable.c index 80706f5..ebeccfe 100644 --- a/dtable.c +++ b/dtable.c @@ -110,8 +110,8 @@ static BOOL installMethodInDtable(Class class, struct objc_slot *slot = SparseArrayLookup(dtable, sel_id); if (NULL != slot && slot->owner == class) { - if (slot->method == method->imp || replaceExisting) { return NO; } - //fprintf(stderr, "Installing method %p %s in %s\n", method->imp, sel_get_name(method->selector), class->name); + if ((slot->method == method->imp) || !replaceExisting) { return NO; } + //fprintf(stderr, "Replacing method %p %s in %s with %x\n", slot->method, sel_get_name(method->selector), class->name, method->imp); slot->method = method->imp; slot->version++; }