diff --git a/src/util/mp_arith.cpp b/src/util/mp_arith.cpp index 2ee5fd05f0d..06143d775e7 100644 --- a/src/util/mp_arith.cpp +++ b/src/util/mp_arith.cpp @@ -262,7 +262,7 @@ mp_integer arith_left_shift( llong_t result=a.to_long()<true_size) throw "shift value out of range"; - llong_t sign=(1<<(true_size-1))&number; - llong_t pad=(sign==0) ? 0 : ~((1<<(true_size-shift))-1); + const llong_t sign = (1LL << (true_size - 1)) & number; + const llong_t pad = (sign == 0) ? 0 : ~((1LL << (true_size - shift)) - 1); llong_t result=(number >> shift)|pad; return result; } @@ -302,8 +302,8 @@ mp_integer logic_left_shift( llong_t result=a.to_long()<> shift)|((number<> revShift); return result; }