[spv-in] fix integer constants parsing (#756)

This commit is contained in:
Dzmitry Malyshau
2021-04-23 01:05:10 -04:00
committed by GitHub
parent f0cf6a6772
commit b15a23c61f

View File

@@ -2873,7 +2873,7 @@ impl<I: Iterator<Item = u32>> Parser<I> {
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),
),
}
}