From ccb42deba457b4e67fc5144545ea3213b46fc155 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 29 Nov 2024 16:55:30 +0000 Subject: [PATCH] Fix deserialization of int64 values --- lib/serializer/BinaryDeserializer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/serializer/BinaryDeserializer.h b/lib/serializer/BinaryDeserializer.h index 136d95db1..9db041b2e 100644 --- a/lib/serializer/BinaryDeserializer.h +++ b/lib/serializer/BinaryDeserializer.h @@ -131,12 +131,12 @@ public: if ((byteValue & 0x80) != 0) { - valueUnsigned |= (byteValue & 0x7f) << offset; + valueUnsigned |= static_cast(byteValue & 0x7f) << offset; offset += 7; } else { - valueUnsigned |= (byteValue & 0x3f) << offset; + valueUnsigned |= static_cast(byteValue & 0x3f) << offset; bool isNegative = (byteValue & 0x40) != 0; if (isNegative) return -static_cast(valueUnsigned);