summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/canonical_query_encoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/canonical_query_encoder.cpp')
-rw-r--r--src/mongo/db/query/canonical_query_encoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/query/canonical_query_encoder.cpp b/src/mongo/db/query/canonical_query_encoder.cpp
index c8a8cd29d48..61ee86dc2c8 100644
--- a/src/mongo/db/query/canonical_query_encoder.cpp
+++ b/src/mongo/db/query/canonical_query_encoder.cpp
@@ -989,7 +989,7 @@ public:
void preVisit(const MatchExpression* expr) {
// Encode the type of the node as well as the path (if there is a non-empty path).
- _builder->appendStr(encodeMatchType(expr->matchType()));
+ _builder->appendCStr(encodeMatchType(expr->matchType()));
encodeUserString(expr->path(), _builder);
// The node encodes itself, and then its children.
@@ -1053,7 +1053,7 @@ std::string encodeSBE(const CanonicalQuery& cq) {
encodeKeyForAutoParameterizedMatchSBE(cq.root(), &bufBuilder);
bufBuilder.appendBuf(proj.objdata(), proj.objsize());
- bufBuilder.appendStr(strBuilderEncoded, false /* includeEndingNull */);
+ bufBuilder.appendStrBytes(strBuilderEncoded);
encodeFindCommandRequest(cq.getFindCommandRequest(), &bufBuilder);