diff options
author | Max Cai <maxtroy@google.com> | 2015-03-20 23:14:08 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-20 23:14:08 +0000 |
commit | e95fca42a42e15717eb9afcc27b0031736ec3ffe (patch) | |
tree | 298bf379e2d05489ab6d5907221d22778bb1e885 | |
parent | 5b436ebbb3dcde564a47accffa3d207f813df645 (diff) | |
parent | 682363bcf6addd6cdb822bc0fed5cd724ffe957d (diff) | |
download | external_protobuf-e95fca42a42e15717eb9afcc27b0031736ec3ffe.zip external_protobuf-e95fca42a42e15717eb9afcc27b0031736ec3ffe.tar.gz external_protobuf-e95fca42a42e15717eb9afcc27b0031736ec3ffe.tar.bz2 |
am 682363bc: am a76831c3: Merge "Fix how getRepeatedFieldArrayLength works"
* commit '682363bcf6addd6cdb822bc0fed5cd724ffe957d':
Fix how getRepeatedFieldArrayLength works
-rw-r--r-- | java/src/main/java/com/google/protobuf/nano/WireFormatNano.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java index 1ff8f06..a3405e5 100644 --- a/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java +++ b/java/src/main/java/com/google/protobuf/nano/WireFormatNano.java @@ -113,11 +113,7 @@ public final class WireFormatNano { int arrayLength = 1; int startPos = input.getPosition(); input.skipField(tag); - while (input.getBytesUntilLimit() > 0) { - int thisTag = input.readTag(); - if (thisTag != tag) { - break; - } + while (input.readTag() == tag) { input.skipField(tag); arrayLength++; } |