Skip to content

Commit e1168b0

Browse files
committed
Fix readBitsIntLe to use unsigned right bit shift
See kaitai-io/kaitai_struct_javascript_runtime@1f8dd95
1 parent de129e4 commit e1168b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/io/kaitai/struct/KaitaiStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public long readBitsIntLe(int n) {
247247
// derive reading result
248248
long res = bits & mask;
249249
// remove bottom bits that we've just read by shifting
250-
bits >>= n;
250+
bits >>>= n;
251251
bitsLeft -= n;
252252

253253
return res;

0 commit comments

Comments
 (0)