Skip to content

Commit

Permalink
Fix the long64 reader in umarshal.py (pythonGH-107828)
Browse files Browse the repository at this point in the history
  • Loading branch information
martindemello authored Aug 10, 2023
1 parent 16dcce2 commit 50bbc56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tools/build/umarshal.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def r_long64(self) -> int:
x |= buf[1] << 8
x |= buf[2] << 16
x |= buf[3] << 24
x |= buf[1] << 32
x |= buf[1] << 40
x |= buf[1] << 48
x |= buf[1] << 56
x |= buf[4] << 32
x |= buf[5] << 40
x |= buf[6] << 48
x |= buf[7] << 56
x |= -(x & (1<<63)) # Sign-extend
return x

Expand Down

0 comments on commit 50bbc56

Please sign in to comment.