mfbt/decimal/zero-serialization.patch
author Ben Kelly <ben@wanderview.com>
Tue, 10 Feb 2015 23:55:43 -0500
changeset 228679 48906d15a28eafe9a84d7607f17bcd6661a540fb
parent 130915 f40200a441622c0c73be1eb5789b9c185da46cb5
child 284452 9da84cc6a2367ae3fade04dab254cd182d21abee
permissions -rw-r--r--
Bug 1100398 P5 Provide NS_CloneInputStream() factory method in nsStreamUtils.h. r=froydnj

diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
--- a/mfbt/decimal/Decimal.cpp
+++ b/mfbt/decimal/Decimal.cpp
@@ -278,17 +278,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)
 {
 }