Commit 46635ab8 authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed integer product overflow check

parent 922fa848
......@@ -307,7 +307,7 @@ public:
inline static bool checkProd(int32_t lhs, int32_t rhs) {
// Check for integer overflow
int64_t prod = lhs * rhs;
int64_t prod = int64_t(lhs) * int64_t(rhs);
return (prod >> 32)==(prod >> 31);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment