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

Commit 44023a4f authored by Stephen Hines's avatar Stephen Hines Committed by Gerrit Code Review
Browse files

Merge "We need to update mPos when we copy a FieldPacker via its data[] member."

parents 0b572896 fcb3161e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -37,10 +37,15 @@ public class FieldPacker {
    }

    public FieldPacker(byte[] data) {
        mPos = 0;
        // Advance mPos to the end of the buffer, since we are copying in the
        // full data input.
        mPos = data.length;
        mLen = data.length;
        mData = data;
        mAlignment = new BitSet();
        // TODO: We should either have an actual FieldPacker copy constructor
        // or drop support for computing alignment like this. As it stands,
        // subAlign() can never work correctly for copied FieldPacker objects.
    }

    public void align(int v) {