8000 [3.11] Fix the long64 reader in umarshal.py (GH-107828) by miss-islington · Pull Request #107850 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] Fix the long64 reader in umarshal.py (GH-107828) #107850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix the long64 reader in umarshal.py (GH-107828)
(cherry picked from commit 50bbc56)

Co-authored-by: Martin DeMello <martindemello@gmail.com>
  • Loading branch information
martindemello authored and miss-islington committed Aug 10, 2023
commit 568d6cda2be874d8b78b9ee86a1a4040abcad9b4
8 changes: 4 additions & 4 deletions Tools/scripts/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