Skip to content

Commit

Permalink
Update BHTwitter.x
Browse files Browse the repository at this point in the history
  • Loading branch information
BandarHL authored Mar 5, 2023
1 parent 1b503e1 commit 2c21e77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BHTwitter/BHTwitter.x
Original file line number Diff line number Diff line change
Expand Up @@ -1102,11 +1102,13 @@ static void batchSwizzlingOnClass(Class cls, NSArray<NSString*>*origSelectors, I
Method *methods = class_copyMethodList([self class], &methodCount);
for (unsigned int i = 0; i < methodCount; ++i) {
Method method = methods[i];
char returnType[255];
method_getReturnType(method, returnType, 255);
const char *name = sel_getName(method_getName(method));
NSString *selector = [NSString stringWithUTF8String:name];

// Don't add methods with arguments
if (![selector containsString:@":"]) {
// Just add methods that have return type.
if ([@(returnType) containsString:@"@"]) {
[fontsMethods addObject:selector];
}
}
Expand Down

0 comments on commit 2c21e77

Please sign in to comment.