summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobjbuilder.h
diff options
context:
space:
mode:
authorVincent Do <vincent.do@mongodb.com>2016-06-10 15:49:13 -0400
committerVincent Do <vincent.do@10gen.com>2016-06-13 11:03:16 -0400
commitda9f93e1695852b01d4bbcfad247669725c9353a (patch)
tree1c6f4db42dc38b5e7560591cfc871de1e20e449f /src/mongo/bson/bsonobjbuilder.h
parentfd77e162bd656f245e4735385a8077472142c08b (diff)
downloadmongo-da9f93e1695852b01d4bbcfad247669725c9353a.tar.gz
SERVER-24525 Fix BSON encoding and decoding for decimal
Diffstat (limited to 'src/mongo/bson/bsonobjbuilder.h')
-rw-r--r--src/mongo/bson/bsonobjbuilder.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h
index 74593287942..10b8a93b80e 100644
--- a/src/mongo/bson/bsonobjbuilder.h
+++ b/src/mongo/bson/bsonobjbuilder.h
@@ -260,6 +260,7 @@ public:
BSONObjBuilder& append(StringData fieldName, Decimal128 n) {
_b.appendNum(static_cast<char>(NumberDecimal));
_b.appendStr(fieldName);
+ // Make sure we write data in a Little Endian conforming manner
_b.appendNum(n);
return *this;
}