From e6635bc020ece3b0d863f80713bc949d15d9478a Mon Sep 17 00:00:00 2001 From: JieLiang Ma Date: Fri, 17 Aug 2018 15:36:19 +0800 Subject: [PATCH] Fix bug in signature compare --- RSSwizzle/RSSwizzle.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RSSwizzle/RSSwizzle.m b/RSSwizzle/RSSwizzle.m index 5c638e0..c2ef970 100644 --- a/RSSwizzle/RSSwizzle.m +++ b/RSSwizzle/RSSwizzle.m @@ -130,8 +130,8 @@ static BOOL blockIsCompatibleWithMethodType(id block, const char *methodType){ blockSignatureArg = "@"; } - if (strcmp(blockSignatureArg, - [methodSignature getArgumentTypeAtIndex:i]) != 0) + if (strncmp(blockSignatureArg, + [methodSignature getArgumentTypeAtIndex:i], 1) != 0) { return NO; }