8000 [3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849) · python/cpython@585b4cc · GitHub
[go: up one dir, main page]

Skip to content

Commit 585b4cc

Browse files
[3.12] Fix the long64 reader in umarshal.py (GH-107828) (#107849)
Fix the long64 reader in umarshal.py (GH-107828) (cherry picked from commit 50bbc56) Co-authored-by: Martin DeMello <martindemello@gmail.com>
1 parent 81d3afa commit 585b4cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tools/build/umarshal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ def r_long64(self) -> int:
125125
x |= buf[1] << 8
126126
x |= buf[2] << 16
127127
x |= buf[3] << 24
128-
x |= buf[1] << 32
129-
x |= buf[1] << 40
130-
x |= buf[1] << 48
131-
x |= buf[1] << 56
128+
x |= buf[4] << 32
129+
x |= buf[5] << 40
130+
x |= buf[6] << 48
131+
x |= buf[7] << 56
132132
x |= -(x & (1<<63)) # Sign-extend
133133
return x
134134

0 commit comments

Comments
 (0)
0