Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f919b18 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix the tag size in token of ProtoOutputStream.cpp, the java version...

Merge "Fix the tag size in token of ProtoOutputStream.cpp, the java version has the correct tag size computed."
parents 96080b54 295d9b1d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -249,15 +249,15 @@ ProtoOutputStream::start(uint64_t fieldId)
    }

    uint32_t id = (uint32_t)fieldId;
    size_t prevPos = mBuffer.wp()->pos();
    mBuffer.writeHeader(id, WIRE_TYPE_LENGTH_DELIMITED);

    size_t sizePos = mBuffer.wp()->pos();

    mDepth++;
    mObjectId++;
    mBuffer.writeRawFixed64(mExpectedObjectToken); // push previous token into stack.

    mExpectedObjectToken = makeToken(get_varint_size(id),
    mExpectedObjectToken = makeToken(sizePos - prevPos,
        (bool)(fieldId & FIELD_COUNT_REPEATED), mDepth, mObjectId, sizePos);
    return mExpectedObjectToken;
}