Skip to content

Commit 62409c5

Browse files
committed
Fixed argument check in RuntimeUtils.msg(). shannah#27
1 parent ac4fc3e commit 62409c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/ca/weblite/objc/RuntimeUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ public static Object msg(boolean coerceReturn, boolean coerceArgs, Pointer recei
581581
Pointer methodSignature = msgPointer(receiver, "methodSignatureForSelector:", selector);
582582

583583
int numArgs = (int)msg(methodSignature, "numberOfArguments");
584-
if ( numArgs ==2 && numArgs != args.length+2 ){
584+
if ( numArgs >=2 && numArgs != args.length+2 ){
585585
throw new RuntimeException("Wrong argument count. The selector "+selName(selector)+" requires "+(numArgs-2)+" arguments, but received "+args.length);
586586
}
587587

0 commit comments

Comments
 (0)