Skip to content

Commit 0163d15

Browse files
committed
Cast filebytes to int64
Adding just causes the multiplication to precede the bitwise & operator, so I added an extra set of parentheses to maintain the order.
1 parent e729062 commit 0163d15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/annotation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2237,8 +2237,8 @@ def proc_core_fields(filebytes, bpi):
22372237

22382238
# Not a skip - it is the actual sample number + annotation type store value
22392239
label_store = int(filebytes[bpi, 1]) >> 2
2240-
sample_diff += np.int64(filebytes[bpi, 0]) + 256 * np.int64(
2241-
filebytes[bpi, 1] & 3
2240+
sample_diff += np.int64(filebytes[bpi, 0]) + 256 * (np.int64(
2241+
filebytes[bpi, 1]) & 3
22422242
)
22432243
bpi = bpi + 1
22442244

0 commit comments

Comments
 (0)