From 232b69580ff7af3940db5d709c8002270d5cbaad Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Fri, 21 Feb 2014 15:58:04 +0400 Subject: [PATCH] ScalarCodec fix --- libuavcan/include/uavcan/internal/marshalling/scalar_codec.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuavcan/include/uavcan/internal/marshalling/scalar_codec.hpp b/libuavcan/include/uavcan/internal/marshalling/scalar_codec.hpp index f62336676d..78a30b72a8 100644 --- a/libuavcan/include/uavcan/internal/marshalling/scalar_codec.hpp +++ b/libuavcan/include/uavcan/internal/marshalling/scalar_codec.hpp @@ -78,7 +78,7 @@ class ScalarCodec static typename EnableIf<((sizeof(T) * 8) > BITLEN)>::Type clearExtraBits(T& value) { - value &= (1 << BITLEN) - 1; // Signedness doesn't matter + value &= (T(1) << BITLEN) - 1; // Signedness doesn't matter } template