bang590 / JSPatch

JSPatch bridge Objective-C and Javascript using the Objective-C runtime. You can call any Objective-C class and method in JavaScript by just including a small engine. JSPatch is generally used to hotfix iOS App.
MIT License
11.37k stars 2.24k forks source link

JPMethodSignature解析CGRect结构体参数出错 #838

Closed yvanda closed 6 years ago

yvanda commented 6 years ago

CGRect结构体参数解析的时候出现错误,_parse方法里面解析"{"的时候 NSUInteger end = [[_types substringFromIndex:i] rangeOfString:@"}"].location + i; arg = [_types substringWithRange:NSMakeRange(i, end - i + 1)]; if (i == 0) { _returnType = arg; } else { [_argumentTypes addObject:arg]; } i = (int)end; rangOfString只能找到第一个"}",而CGRect的type有多个"}",导致参数类型解析出错。