summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/key_string.cpp
diff options
context:
space:
mode:
authorApollon Oikonomopoulos <apoikos@debian.org>2018-03-22 12:08:05 +0200
committerApollon Oikonomopoulos <apoikos@debian.org>2018-03-22 12:08:05 +0200
commit72ad42c506a506ef238d4b1fdcf2b9da5668bfb9 (patch)
treedf94bdab3d6f16e14016f4547b9e86f368ba8150 /src/mongo/db/storage/key_string.cpp
parent648fcfa3cf11ba8fdb7bb64c52f3159b4351ae3c (diff)
parentc49e99631589113663b1a3ac691870421965a315 (diff)
Update upstream source from tag 'upstream/3.4.14'
Update to upstream version '3.4.14' with Debian dir 8c079cd0bdbb1831aa5b89a3b7d4c1b4a1b891a2
Diffstat (limited to 'src/mongo/db/storage/key_string.cpp')
-rw-r--r--src/mongo/db/storage/key_string.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/storage/key_string.cpp b/src/mongo/db/storage/key_string.cpp
index 624c87a2404..fc580ca111d 100644
--- a/src/mongo/db/storage/key_string.cpp
+++ b/src/mongo/db/storage/key_string.cpp
@@ -1366,7 +1366,8 @@ void toBsonValue(uint8_t ctype,
Decimal128 dec(Decimal128::Value{lowbits, highbits});
if (isNegative)
dec = dec.negate();
- dec = adjustDecimalExponent(typeBits, dec);
+ if (dec.isFinite())
+ dec = adjustDecimalExponent(typeBits, dec);
*stream << dec;
break;
}
@@ -1385,7 +1386,8 @@ void toBsonValue(uint8_t ctype,
Decimal128 dec(bin, Decimal128::kRoundTo34Digits, roundAwayFromZero);
if (hasDecimalContinuation)
dec = readDecimalContinuation(reader, inverted, dec);
- dec = adjustDecimalExponent(typeBits, dec);
+ if (dec.isFinite())
+ dec = adjustDecimalExponent(typeBits, dec);
*stream << dec;
}
break;