Skip to content

Commit

Permalink
Mask out all but low byte
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Nov 26, 2023
1 parent 3656295 commit 9ba1fd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/sun/jna/Function.java
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Object invoke(Object[] args, Class<?> returnType, boolean allowObjects, int fixe
Native.invokeVoid(this, this.peer, callFlags, args);
result = null;
} else if (returnType==boolean.class || returnType==Boolean.class) {
result = valueOf(Native.invokeInt(this, this.peer, callFlags, args) != 0);
result = valueOf((byte)Native.invokeInt(this, this.peer, callFlags, args) != 0);
} else if (returnType==byte.class || returnType==Byte.class) {
result = Byte.valueOf((byte)Native.invokeInt(this, this.peer, callFlags, args));
} else if (returnType==short.class || returnType==Short.class) {
Expand Down

0 comments on commit 9ba1fd4

Please sign in to comment.