Index: base/numerics/safe_math.h |
diff --git a/base/numerics/safe_math.h b/base/numerics/safe_math.h |
index 51a534f421ccdfeb9c81afaf338517571be39fa6..b3694fe78ff1de1eb2b0bf7771546248c864c111 100644 |
--- a/base/numerics/safe_math.h |
+++ b/base/numerics/safe_math.h |
@@ -205,9 +205,10 @@ class CheckedNumeric { |
lhs.ValueUnsafe() OP rhs.ValueUnsafe(), \ |
GetRangeConstraint(rhs.validity() | lhs.validity())); \ |
RangeConstraint validity = RANGE_VALID; \ |
- T result = Checked##NAME(static_cast<Promotion>(lhs.ValueUnsafe()), \ |
- static_cast<Promotion>(rhs.ValueUnsafe()), \ |
- &validity); \ |
+ T result = static_cast<T>(Checked##NAME( \ |
+ static_cast<Promotion>(lhs.ValueUnsafe()), \ |
+ static_cast<Promotion>(rhs.ValueUnsafe()), \ |
+ &validity)); \ |
return CheckedNumeric<Promotion>( \ |
result, \ |
GetRangeConstraint(validity | lhs.validity() | rhs.validity())); \ |