summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2017-10-19 15:59:39 -0400
committerGeert Bosch <geert@mongodb.com>2017-10-19 16:00:47 -0400
commit6459867cc36f379d01f2f99642f6edcabdd3c1ce (patch)
tree2151efbbedd78c4862b44054d23654080066864b
parent830fe9d2093b365d51aaafadfecefcdd09fd0ede (diff)
downloadmongo-6459867cc36f379d01f2f99642f6edcabdd3c1ce.tar.gz
SERVER-31026 Fix Windows zero-length array error
-rw-r--r--src/mongo/bson/bsonelement_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/bson/bsonelement_test.cpp b/src/mongo/bson/bsonelement_test.cpp
index cca5dbb7ed4..34fa8a9d982 100644
--- a/src/mongo/bson/bsonelement_test.cpp
+++ b/src/mongo/bson/bsonelement_test.cpp
@@ -60,7 +60,7 @@ TEST(BSONElement, BinDataToString) {
0x81,
0x64,
0xff}; // Valid RFC4122v4 UUID, but with extra byte added.
- unsigned char zeroLength[] = {};
+ unsigned char zeroLength[1] = {0}; // Not truly zero because Windows doesn't support that.
StringData unknownType = "binary data\000with an unknown type"_sd; // No terminating zero
const BinDataType unknownBinDataType = BinDataType(42);
builder.appendBinData("bintype0", sizeof(bintype0), BinDataGeneral, bintype0);