From b15a23c61ff72e05ead1ab696922ce1e1825667e Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Fri, 23 Apr 2021 01:05:10 -0400 Subject: [PATCH] [spv-in] fix integer constants parsing (#756) --- src/front/spv/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/front/spv/mod.rs b/src/front/spv/mod.rs index 9011e5f19f..44cfbb1b0d 100644 --- a/src/front/spv/mod.rs +++ b/src/front/spv/mod.rs @@ -2873,7 +2873,7 @@ impl> Parser { crate::ConstantInner::Scalar { width, value: crate::ScalarValue::Sint( - ((u64::from(high) << 32) | u64::from(low)) as i64, + (i64::from(high as i32) << 32) | ((i64::from(low as i32) << 32) >> 32), ), } }