Skip to content

Commit

Permalink
Fix fourBytesToInt
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3D3V committed Dec 30, 2024
1 parent c0fb825 commit 2ca2f90
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public static long eigthBytesToLong(byte[] bytes) {
| (long) (bytes[7] & 0xFF);
}

public static long fourBytesToInt(byte[] bytes) {
return (long) (bytes[4] & 0xFF) << 24
| (long) (bytes[5] & 0xFF) << 16
| (long) (bytes[6] & 0xFF) << 8
| (long) (bytes[7] & 0xFF);
public static int fourBytesToInt(byte[] bytes) {
return (bytes[4] & 0xFF) << 24
| (bytes[5] & 0xFF) << 16
| (bytes[6] & 0xFF) << 8
| bytes[7] & 0xFF;
}

/**
Expand Down

0 comments on commit 2ca2f90

Please sign in to comment.