diff --git a/include/boost/container_hash/detail/hash_range.hpp b/include/boost/container_hash/detail/hash_range.hpp index 930ee22..6df98c1 100644 --- a/include/boost/container_hash/detail/hash_range.hpp +++ b/include/boost/container_hash/detail/hash_range.hpp @@ -125,9 +125,9 @@ std::size_t>::type std::size_t const x2 = n >> 1; // 1: 0, 2: 1, 3: 1 v1 = - static_cast( static_cast( p[ x1 ] ) ) << x1 * 8 | - static_cast( static_cast( p[ x2 ] ) ) << x2 * 8 | - static_cast( static_cast( p[ 0 ] ) ); + static_cast( static_cast( p[ static_cast( x1 ) ] ) ) << x1 * 8 | + static_cast( static_cast( p[ static_cast( x2 ) ] ) ) << x2 * 8 | + static_cast( static_cast( p[ 0 ] ) ); } w += q;