Skip to content

Commit

Permalink
Return zero for 'fixedArgs' if method is not varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
twall committed Feb 8, 2016
1 parent 50eb820 commit 5c4d271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/sun/jna/VarArgsChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ boolean isVarArgs(Method m) {

int fixedArgs(Method m) {
// In Java, final argument contains all "varargs"
return m.getParameterTypes().length - 1;
return m.isVarArgs() ? m.getParameterTypes().length - 1 : 0;
}
}

Expand Down

0 comments on commit 5c4d271

Please sign in to comment.