mfbt/decimal/zero-serialization.patch
author Andrea Marchesini <amarchesini@mozilla.com>
Wed, 26 Jul 2017 08:54:26 +0200
changeset 422380 067897f212ac50c81efb30aadd98cd01b103c901
parent 322691 9da84cc6a2367ae3fade04dab254cd182d21abee
child 538845 d78adc84bde8cb23a2e34c444d48406bd198c797
permissions -rw-r--r--
Bug 1381748 - Cleanup FetchConsumer workflow - part 2 - cleanup RegisterWorkerHolder, r=catalinb

diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
--- a/mfbt/decimal/Decimal.cpp
+++ b/mfbt/decimal/Decimal.cpp
@@ -277,17 +277,17 @@ bool Decimal::EncodedData::operator==(co
 }
 
 Decimal::Decimal(int32_t i32)
     : m_data(i32 < 0 ? Negative : Positive, 0, i32 < 0 ? static_cast<uint64_t>(-static_cast<int64_t>(i32)) : static_cast<uint64_t>(i32))
 {
 }
 
 Decimal::Decimal(Sign sign, int exponent, uint64_t coefficient)
-    : m_data(sign, exponent, coefficient)
+    : m_data(sign, coefficient ? exponent : 0, coefficient)
 {
 }
 
 Decimal::Decimal(const EncodedData& data)
     : m_data(data)
 {
 }