diff options
author | Martin DeMello <martindemello@gmail.com> | 2023-08-10 20:43:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 20:43:14 (GMT) |
commit | 50bbc56009ae7303d2482f28eb62f2603664b58f (patch) | |
tree | 991a91d06169f16a42f36099e2ff3d3c2ca30018 | |
parent | 16dcce21768ba381996a88ac8c255bf1490b3680 (diff) | |
download | cpython-50bbc56009ae7303d2482f28eb62f2603664b58f.zip cpython-50bbc56009ae7303d2482f28eb62f2603664b58f.tar.gz cpython-50bbc56009ae7303d2482f28eb62f2603664b58f.tar.bz2 |
Fix the long64 reader in umarshal.py (GH-107828)
-rw-r--r-- | Tools/build/umarshal.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/build/umarshal.py b/Tools/build/umarshal.py index f61570c..e05d93c 100644 --- a/Tools/build/umarshal.py +++ b/Tools/build/umarshal.py @@ -125,10 +125,10 @@ class Reader: 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 |