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

* commit '44023a4f20a38ed892a6181765337635d77b1de8':
  We need to update mPos when we copy a FieldPacker via its data[] member.
This commit is contained in:
Stephen Hines
2014-06-24 06:53:18 +00:00
committed by Android Git Automerger

View File

@@ -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) {