Index: base/numerics/safe_math_impl.h |
diff --git a/base/numerics/safe_math_impl.h b/base/numerics/safe_math_impl.h |
index c8451898bb522681c4d4761cb83a7656e556900f..08f2e88345f34d62870dcf16c569b126304f06f6 100644 |
--- a/base/numerics/safe_math_impl.h |
+++ b/base/numerics/safe_math_impl.h |
@@ -176,8 +176,8 @@ typename enable_if<std::numeric_limits<T>::is_integer&& std::numeric_limits< |
T>::is_signed&&(sizeof(T) * 2 > sizeof(uintmax_t)), |
T>::type |
CheckedMul(T x, T y, RangeConstraint* validity) { |
- // if either side is zero then the result will be zero. |
- if (!(x || y)) { |
jschuh
2015/05/18 14:28:04
fwiw, I think I intended this:
if (!(x | y)) {
|
+ // If either side is zero then the result will be zero. |
+ if (!x || !y) { |
return RANGE_VALID; |
} else if (x > 0) { |