From 568d6cda2be874d8b78b9ee86a1a4040abcad9b4 Mon Sep 17 00:00:00 2001 From: Martin DeMello Date: Thu, 10 Aug 2023 13:43:14 -0700 Subject: [PATCH] Fix the long64 reader in umarshal.py (GH-107828) (cherry picked from commit 50bbc56009ae7303d2482f28eb62f2603664b58f) Co-authored-by: Martin DeMello --- Tools/scripts/umarshal.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tools/scripts/umarshal.py b/Tools/scripts/umarshal.py index f61570cbaff751..e05d93cf23c921 100644 --- a/Tools/scripts/umarshal.py +++ b/Tools/scripts/umarshal.py @@ -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