Skip to content

Commit 3553284

Browse files
committed
fix: Add missing mask to readWord
1 parent 0ee0d59 commit 3553284

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/software/coley/llzip/util/ByteDataUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public static boolean startsWith(ByteData data, long offset, int[] pattern) {
116116
* @return Value of word.
117117
*/
118118
public static int readWord(ByteData data, long i) {
119-
return data.getShort(i);
119+
return data.getShort(i) & 0xFFFF;
120120
}
121121

122122
/**

0 commit comments

Comments
 (0)