From b7ef58bc59a5957238885cdddcd3e683cff40bff Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sun, 25 Mar 2018 10:04:54 +0100 Subject: [PATCH] Look up the class name when registering an alias. In the v1 ABI, this function is called with the class symbol directly, so we need to make sure that we replace it with the upgraded symbol. --- alias_table.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/alias_table.c b/alias_table.c index 9fda1cd..6bf2bd6 100644 --- a/alias_table.c +++ b/alias_table.c @@ -106,6 +106,8 @@ BOOL class_registerAlias_np(Class class, const char *alias) return 0; } + class = (Class)objc_getClass(class->name); + /* * If there already exists a matching alias, determine whether we the existing * alias is the correct one. Please note that objc_getClass() goes through the