diff --git a/encoding2.c b/encoding2.c index 1bcdb89..5e73245 100644 --- a/encoding2.c +++ b/encoding2.c @@ -59,7 +59,9 @@ static char* copyTypeEncoding(const char *types) static const char * findParameterStart(const char *types, unsigned int index) { - for (unsigned int i=0 ; itypes, index + 1); + const char *types = findParameterStart(method->types, index); if (NULL == types) { strncpy(dst, "", dst_len); @@ -433,7 +435,7 @@ unsigned method_get_number_of_arguments(struct objc_method *method) char* method_copyArgumentType(Method method, unsigned int index) { if (NULL == method) { return NULL; } - const char *types = findParameterStart(method->types, index + 1); + const char *types = findParameterStart(method->types, index); if (NULL == types) { return NULL;