zero-serialization.patch 620 B

1234567891011121314151617181920212223
  1. diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
  2. --- a/mfbt/decimal/Decimal.cpp
  3. +++ b/mfbt/decimal/Decimal.cpp
  4. @@ -277,17 +277,17 @@ bool Decimal::EncodedData::operator==(co
  5. }
  6. Decimal::Decimal(int32_t i32)
  7. : m_data(i32 < 0 ? Negative : Positive, 0, i32 < 0 ? static_cast<uint64_t>(-static_cast<int64_t>(i32)) : static_cast<uint64_t>(i32))
  8. {
  9. }
  10. Decimal::Decimal(Sign sign, int exponent, uint64_t coefficient)
  11. - : m_data(sign, exponent, coefficient)
  12. + : m_data(sign, coefficient ? exponent : 0, coefficient)
  13. {
  14. }
  15. Decimal::Decimal(const EncodedData& data)
  16. : m_data(data)
  17. {
  18. }