@@ -248,9 +248,6 @@ int main(int argc, const char * argv[]) {
248248 printf (" 缺少垃圾代码函数调用名,或参数名\" %s \" 不合法(需要字母开头)\n " , [gSpamCodeFuncationCallName UTF8String ]);
249249 return 1 ;
250250 }
251- } else {
252- printf (" 缺少垃圾代码函数调用名\n " );
253- return 1 ;
254251 }
255252
256253 i++;
@@ -261,9 +258,6 @@ int main(int argc, const char * argv[]) {
261258 printf (" 缺少 NewClass 代码函数调用名,或参数名\" %s \" 不合法(需要字母开头)\n " , [gNewClassFuncationCallName UTF8String ]);
262259 return 1 ;
263260 }
264- } else {
265- printf (" 缺少 NewClass 代码函数调用名\n " );
266- return 1 ;
267261 }
268262 continue ;
269263 }
@@ -504,7 +498,7 @@ void generateSpamCodeFile(NSString *outDirectory, NSString *mFilePath, GSCSource
504498 [mFileMethodsString appendString: @" }\n " ];
505499
506500 if (methodCallName.length > 0 ) {
507- if (categoryCallFuncString.length <= 0 ) {
501+ if (gSpamCodeFuncationCallName && categoryCallFuncString.length <= 0 ) {
508502 [categoryCallFuncString appendFormat: @" static inline NSInteger %@ () {\n NSInteger ret = 0;\n " , gSpamCodeFuncationCallName ];
509503 }
510504 [categoryCallFuncString appendFormat: @" ret += [%@ %@ :%u ] ? 1 : 0;\n " , className, methodCallName, arc4random_uniform (100 )];
@@ -520,7 +514,7 @@ void generateSpamCodeFile(NSString *outDirectory, NSString *mFilePath, GSCSource
520514 }
521515
522516 if (newClassMethodCallName.length > 0 ) {
523- if (newClassCallFuncString.length <= 0 ) {
517+ if (gNewClassFuncationCallName && newClassCallFuncString.length <= 0 ) {
524518 [newClassCallFuncString appendFormat: @" static inline NSInteger %@ () {\n NSInteger ret = 0;\n " , gNewClassFuncationCallName ];
525519 }
526520 [newClassCallFuncString appendFormat: @" ret += [%@ %@ :%u ] ? 1 : 0;\n " , newClassName, newClassMethodCallName, arc4random_uniform (100 )];
0 commit comments