Skip to content

Commit df692fe

Browse files
committed
Fix a last byte ordering bug with reads that increase the bitshift.
1 parent cfe028a commit df692fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sc2reader/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,8 @@ def read(self, bytes=0, bits=0):
456456
first = first >> abs(adjustment)
457457
raw_bytes.append(first | last)
458458
elif adjustment > 0:
459-
raw_bytes.append(last & adjustment_mask)
460459
raw_bytes.append(first | (last >> adjustment))
460+
raw_bytes.append(last & adjustment_mask)
461461
else:
462462
raw_bytes.append(first | last)
463463

0 commit comments

Comments
 (0)